base_indexer 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/base_indexer/main_indexer_engine.rb +11 -0
- data/lib/base_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: c7ea4cd421f377a0dfde47d401fe4b6ca20109d1
|
4
|
+
data.tar.gz: 43b93f9e9e73097db8b2b32c5fa4c1c93e57606c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87306d3dc67800ebbb6f7488d3154f92c1ec003d90ad08a22e5914c2636ed0f8731fd8c7b4fdb94147440cb80bceecc1e28e794eb6bda00de2c06c1cfb196869
|
7
|
+
data.tar.gz: ea79ed4b56a09f6c816e90afbbf780b97c2565866b21b277f1735eaf46abbf6f1f48221cabc16ec772fd3d62f6fcc2cf2d7e9ef59d68252aa2f8790f3e295692
|
@@ -43,6 +43,8 @@ module BaseIndexer
|
|
43
43
|
targets_hash = get_targets_hash_from_param(targets)
|
44
44
|
end
|
45
45
|
|
46
|
+
targets_hash = update_targets_before_write(targets_hash, purl_model)
|
47
|
+
|
46
48
|
# Get SOLR configuration and write
|
47
49
|
solr_targets_configs = BaseIndexer.solr_configuration_class_name.constantize.instance.get_configuration_hash
|
48
50
|
BaseIndexer.solr_writer_class_name.constantize.new.process( druid, solr_doc, targets_hash, solr_targets_configs)
|
@@ -79,6 +81,15 @@ module BaseIndexer
|
|
79
81
|
return targets_hash
|
80
82
|
end
|
81
83
|
|
84
|
+
# It allows the consumer to modify the targets list before doing the final writing
|
85
|
+
# to the solr core. Default behavior returns the targets_hash as it is
|
86
|
+
# @param targets_hash [Hash] a hash of targets with true value
|
87
|
+
# @param purl_model [DiscoveryIndexer::Reader::PurlxmlModel] represents the purlxml model
|
88
|
+
# @return [Hash] a hash of targets
|
89
|
+
def update_targets_before_write(targets_hash, purl_model)
|
90
|
+
return targets_hash
|
91
|
+
end
|
92
|
+
|
82
93
|
# It converts collection_druids list to a hash with names. If the druid doesn't
|
83
94
|
# have a collection name, it will be excluded from the hash
|
84
95
|
# @param collection_druids [Array] a list of druids
|
data/lib/base_indexer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: base_indexer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ahmed Alsum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|