From 04e860861fd709e21fd916a68924e89caee9ac53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rath=C3=A9?= Date: Mon, 23 Feb 2015 13:47:58 -0500 Subject: [PATCH] Force no_timeout in mongoid adapter --- elasticsearch-model/lib/elasticsearch/model/adapters/mongoid.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch-model/lib/elasticsearch/model/adapters/mongoid.rb b/elasticsearch-model/lib/elasticsearch/model/adapters/mongoid.rb index 51c9e1be3..7c4f18a16 100644 --- a/elasticsearch-model/lib/elasticsearch/model/adapters/mongoid.rb +++ b/elasticsearch-model/lib/elasticsearch/model/adapters/mongoid.rb @@ -66,7 +66,7 @@ def __find_in_batches(options={}, &block) options[:batch_size] ||= 1_000 items = [] - all.each do |item| + all.no_timeout.each do |item| items << item if items.length % options[:batch_size] == 0