cul_scv_hydra 0.19.1 → 0.19.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cul_scv_hydra/solrizer/scv_mods_fieldable.rb +13 -6
- data/lib/cul_scv_hydra/version.rb +1 -1
- data/lib/cul_scv_hydra/version.rb~ +1 -1
- data/lib/tasks/index.rake +13 -4
- 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: 372040457992fc3bf6904552bebc868ea58bbf6e
|
4
|
+
data.tar.gz: b3c8c77276595757a9d31afdda0d0e2575ba7961
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6626b1d16b9bdb878a66206d605a0259a5cf228f49874bcb6ba2cec699ee5dd14491a40a918450e09bacc0a3961016af8901f9af0e237f34c04e5454b8629046
|
7
|
+
data.tar.gz: 1aad0639cd8364a706a68c768f79abbbd294dd7a96fd77eac8666f1d8a25b8915ecc3e550520ada058404a057ec68008c22cba50d98ca70fad5e44385a2ade58
|
@@ -350,17 +350,24 @@ module Cul::Scv::Hydra::Solrizer
|
|
350
350
|
|
351
351
|
end_date = start_date if end_date.blank?
|
352
352
|
|
353
|
+
puts 'start_date: ' + start_date
|
354
|
+
puts 'end_date: ' + end_date
|
355
|
+
|
353
356
|
year_regex = /^(-?\d{1,4}).*/
|
354
357
|
|
355
358
|
start_year_match = start_date.match(year_regex)
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
+
if start_year_match && start_year_match.captures.length > 0
|
360
|
+
start_year = start_year_match.captures[0]
|
361
|
+
start_year = zero_pad_year(start_year)
|
362
|
+
solr_doc["lib_start_date_year_itsi"] = start_year.to_i # TrieInt version for searches
|
363
|
+
end
|
359
364
|
|
360
365
|
end_year_match = end_date.match(year_regex)
|
361
|
-
|
362
|
-
|
363
|
-
|
366
|
+
if end_year_match && end_year_match.captures.length > 0
|
367
|
+
end_year = end_year_match.captures[0]
|
368
|
+
end_year = zero_pad_year(end_year)
|
369
|
+
solr_doc["lib_end_date_year_itsi"] = end_year.to_i # TrieInt version for searches
|
370
|
+
end
|
364
371
|
|
365
372
|
solr_doc["lib_date_year_range_si"] = start_year + '-' + end_year if start_year
|
366
373
|
|
data/lib/tasks/index.rake
CHANGED
@@ -12,9 +12,16 @@ namespace :cul_scv_hydra do
|
|
12
12
|
START_TIME = Time.now
|
13
13
|
|
14
14
|
ENV["RAILS_ENV"] ||= Rails.env
|
15
|
-
|
16
|
-
if ENV['
|
17
|
-
|
15
|
+
|
16
|
+
if ENV['PIDS']
|
17
|
+
pids = ENV['PIDS'].split(',')
|
18
|
+
else
|
19
|
+
puts 'Please specify one or more comma-delimited pids to recurse over (e.g. PIDS=ldpd:123 or PIDS=ldpd:123,ldpd:456)'
|
20
|
+
next
|
21
|
+
end
|
22
|
+
|
23
|
+
if ENV['OMIT']
|
24
|
+
pids_to_omit = ENV['OMIT'].split(',').map{|pid|pid.strip}
|
18
25
|
else
|
19
26
|
pids_to_omit = nil
|
20
27
|
end
|
@@ -22,7 +29,9 @@ namespace :cul_scv_hydra do
|
|
22
29
|
skip_generic_resources = true if ENV['skip_generic_resources'] == 'true'
|
23
30
|
|
24
31
|
begin
|
25
|
-
|
32
|
+
pids.each do |pid|
|
33
|
+
Cul::Scv::Hydra::Indexer.recursively_index_fedora_objects(pid, pids_to_omit, skip_generic_resources, true)
|
34
|
+
end
|
26
35
|
rescue => e
|
27
36
|
puts 'Error: ' + e.message
|
28
37
|
puts e.backtrace
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cul_scv_hydra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Armintor
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-10-
|
12
|
+
date: 2014-10-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: blacklight
|