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(batch_size=1000)
14
+ def add_all_to_index_tank(options={})
15
+ options[:batch_size] ||= 50
15
16
  count = 0
16
- find_in_batches(:batch_size => batch_size) do |instances|
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
@@ -1,3 +1,3 @@
1
1
  module IndexTanked
2
- GEM_VERSION = '0.1.6'
2
+ GEM_VERSION = '0.1.7'
3
3
  end
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 6
10
- version: 0.1.6
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-22 00:00:00 -05:00
19
+ date: 2011-03-23 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency