lib/sunspot/mongoid2.rb
# The sunspot solr_index method is very dependent on ActiveRecord, so
# we'll change it to work more efficiently with Mongoid.
The sunspot solr_index method is very dependent on ActiveRecord, so
we'll change it to work more efficiently with Mongoid.
The sunspot solr_index method is very dependent on ActiveRecord so we ' ll change it to work more efficiently with Mongoid .
def solr_index_orphans(opts={})
        batch_size = opts[:batch_size] || Sunspot.config.indexing.default_batch_size          
        solr_page = 0
        solr_ids = []
        while (solr_page = solr_page.next)
          ids = solr_search_ids { paginate(:page => solr_page, :per_page => 1000) }.to_a
          break if ids.empty?
          solr_ids.concat ids
        end
        return solr_ids - self.pluck(:id).map(&:to_s)
      end
def solr_index_orphans ( opts = { } ) batch_size = opts [ :batch_size ] || Sunspot . config . indexing . default_batch_size solr_page = 0 solr_ids = [ ] while ( solr_page = solr_page . next ) ids = solr_search_ids { paginate ( :page => solr_page , :per_page => 1000 ) } . to_a break if ids . empty? solr_ids . concat ids end return solr_ids - self . pluck ( :id ) . map ( & :to_s ) end
The sunspot solr_index method is very dependent on ActiveRecord, so
we'll change it to work more efficiently with Mongoid.
The sunspot solr_index method is very dependent on ActiveRecord so we ' ll change it to work more efficiently with Mongoid .
opts
<not_specific>