Skip to content

Commit

Permalink
Remove references to Sunspot.config.indexing since it doesn't seem to…
Browse files Browse the repository at this point in the history
… exist.
  • Loading branch information
AaronH committed Apr 27, 2012
1 parent d269b49 commit 328e0af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sunspot/mongoid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ module ClassMethods
# The sunspot solr_index method is very dependent on ActiveRecord, so
# we'll change it to work more efficiently with Mongoid.
def solr_index(opts={})
batch_size = opts[:batch_size] || Sunspot.config.indexing.default_batch_size
batch_size = opts[:batch_size] || 50 # Sunspot.config.indexing.default_batch_size
0.step(count, batch_size) do |offset|
Sunspot.index(limit(batch_size).skip(offset))
end
Sunspot.commit
end

def solr_index_orphans(opts={})
batch_size = opts[:batch_size] || Sunspot.config.indexing.default_batch_size
batch_size = opts[:batch_size] || 50 #Sunspot.config.indexing.default_batch_size
count = self.count
indexed_ids = solr_search_ids { paginate(:page => 1, :per_page => count) }.to_set
only(:id).each do |object|
Expand Down

0 comments on commit 328e0af

Please sign in to comment.