Using rails 3 and mongoDB with the mongoid adapter, how can I batch finds to the mongo DB? I need to grab all the records in a particular mongo DB collection and index them
The following will work for you , just try it
Model.all.in_groups_of(1000, false) do |r| Sunspot.index! r end