diff --git a/sunspot_rails/lib/sunspot/rails/searchable.rb b/sunspot_rails/lib/sunspot/rails/searchable.rb index f44cf0e96..bb5053367 100644 --- a/sunspot_rails/lib/sunspot/rails/searchable.rb +++ b/sunspot_rails/lib/sunspot/rails/searchable.rb @@ -224,7 +224,7 @@ def solr_reindex(options = {}) # Post.index(:include => :author) # def solr_index(opts={}) - options = { :batch_size => 500, :batch_commit => true, :include => self.sunspot_options[:include], :first_id => 0}.merge(opts) + options = { :batch_size => 500, :batch_commit => true, :include => self.sunspot_options[:include], :first_id => '0'}.merge(opts) unless options[:batch_size] Sunspot.index!(all(:include => options[:include])) else @@ -283,7 +283,7 @@ def solr_index_updated_after(created_updated_after, opts={}) options = { :batch_commit => true, :include => [], - :first_id => 0 + :first_id => '0' }.merge(opts) unless options[:batch_size] Sunspot.index!(all(