index-tanked 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -11,9 +11,10 @@ module IndexTanked
|
|
11
11
|
SearchResult.new(index_tanked.add_fields_to_query(query), @index_tanked.index, self, options)
|
12
12
|
end
|
13
13
|
|
14
|
-
def add_all_to_index_tank(
|
14
|
+
def add_all_to_index_tank(options={})
|
15
|
+
options[:batch_size] ||= 50
|
15
16
|
count = 0
|
16
|
-
find_in_batches(
|
17
|
+
find_in_batches(options) do |instances|
|
17
18
|
documents = instances.map { |instance| instance.index_tanked.document_for_batch_addition }
|
18
19
|
count += documents.size
|
19
20
|
index_tanked.retry_on_error do
|
data/lib/index-tanked/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: index-tanked
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 7
|
10
|
+
version: 0.1.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Adam Kittelson
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-03-
|
19
|
+
date: 2011-03-23 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|