elasticsearch/elasticsearch-rails — pull request #152 by barelyknown (2014-06-24 13:21:40+00:00)
Title: add preprocess option to find_in_batches in ActiveRecord adapter

The need to have a preprocessor was mentioned in this issue => https://github.com/elasticsearch/elasticsearch-rails/issues/151

This pull request adds support for a `:preprocess` option for `__find_in_batches` that enables the user to specify a method to use to preprocess the batch.

The test isn't exactly great, but it does ensure that the preprocessor is getting called when it's defined in the options.

I can add documentation if you're good to merge this.