Sha256: ce8cde7974bb4c967d50eef20064916df8ec16323dc1cf7670a6af6c9f39a08a
Contents?: true
Size: 483 Bytes
Versions: 10
Compression:
Stored size: 483 Bytes
Contents
# NOTE: waiting for https://github.com/elastic/elasticsearch-rails/pull/625 to be merged module Elasticsearch module Model module MongoidExtensions module Importing def __find_in_batches(options = {}) batch_size = options.fetch(:batch_size, 1_000) base_criteria = options.fetch(:criteria, all) base_criteria.no_timeout.each_slice(batch_size) do |items| yield items end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems