harvestdor-indexer 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/harvestdor/indexer/solr.rb +4 -2
- data/lib/harvestdor/indexer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaba4e6dc5856b407d053a43875f26dd9f76bf47
|
4
|
+
data.tar.gz: bce6c1c859e20d63e8c7503c49ca7a0f86668f5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faed68b259bd191dee7d54d407a9c0aca9326999bb02b4b34ce035f05ce01a0a2ed9ed35a9b3135824f311d815d6ff158d2f8f5111d2c2db62b33ffed07b11b0
|
7
|
+
data.tar.gz: 1ca560db599096a21e9346404fd00544a2ed35bdb7684c9318f6d4a5e60c10e4b82124ce6edad8346471b5f8903ed73e6fbcd2c6c6926a16de7c30bea3416b48
|
@@ -20,7 +20,9 @@ module Harvestdor
|
|
20
20
|
# Add the document to solr, retry if an error occurs.
|
21
21
|
# See https://github.com/ooyala/retries for docs on with_retries.
|
22
22
|
# @param [Hash] doc a Hash representation of the solr document
|
23
|
-
|
23
|
+
# @param [String] coll_size the size of the collection
|
24
|
+
# @param [String] index the index of this document (nth to be indexed)
|
25
|
+
def add(doc, coll_size = '?', index = '?')
|
24
26
|
id = doc[:id]
|
25
27
|
|
26
28
|
handler = proc do |exception, attempt_number, _total_delay|
|
@@ -31,7 +33,7 @@ module Harvestdor
|
|
31
33
|
with_retries(max_tries: config.max_retries, handler: handler, base_sleep_seconds: 1, max_sleep_seconds: 5) do |attempt|
|
32
34
|
logger.debug "Attempt #{attempt} for #{id}"
|
33
35
|
client.add(doc)
|
34
|
-
logger.info "Successfully indexed #{id} on attempt #{attempt}"
|
36
|
+
logger.info "Successfully indexed #{id} (#{index}/#{coll_size}) on attempt #{attempt}"
|
35
37
|
end
|
36
38
|
end
|
37
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: harvestdor-indexer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naomi Dushay
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|