spotlight-resources-iiif 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.solr_wrapper.yml +5 -0
- data/.travis.yml +3 -1
- data/Gemfile +20 -9
- data/README.md +4 -0
- data/Rakefile +14 -24
- data/app/controllers/spotlight/resources/iiif_harvester_controller.rb +3 -26
- data/app/models/spotlight/resources/iiif_harvester.rb +3 -13
- data/app/models/spotlight/resources/iiif_manifest.rb +32 -5
- data/app/models/spotlight/resources/iiif_service.rb +7 -4
- data/app/services/spotlight/resources/iiif_builder.rb +17 -0
- data/app/views/spotlight/resources/iiif/_form.html.erb +1 -1
- data/config/routes.rb +1 -1
- data/lib/spotlight/resources/iiif/engine.rb +1 -0
- data/lib/spotlight/resources/iiif/version.rb +1 -1
- data/solr/conf/schema.xml +347 -0
- data/solr/conf/solrconfig.xml +163 -0
- data/spotlight-resources-iiif.gemspec +4 -4
- metadata +18 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a2b95680bb9651d8b35a91ab2b3033c364e6d76
|
4
|
+
data.tar.gz: 200c1bb77a16153ccfc99450550500769d54f124
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e64dbe2c42cbccdaa946a3e608916132b1192e8c5036c562ae042cfa9321142c5b4b685b4e880a3a1f456e27076fb673d213e92a69227f4a4d22ab1e1d5963cd
|
7
|
+
data.tar.gz: 0b5cd3086783d8254389951e66b1a990d622cef9665686189e5c41e5d29651ec7595bf345f69af67050875e107afcbe20c64c49cb8464daa3a4ac62b27badd91
|
data/.solr_wrapper.yml
ADDED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -4,10 +4,10 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
# BEGIN ENGINE_CART BLOCK
|
7
|
-
# engine_cart: 0.
|
8
|
-
# engine_cart stanza: 0.
|
7
|
+
# engine_cart: 0.10.0
|
8
|
+
# engine_cart stanza: 0.10.0
|
9
9
|
# the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
|
10
|
-
file = File.expand_path(
|
10
|
+
file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
|
11
11
|
if File.exist?(file)
|
12
12
|
begin
|
13
13
|
eval_gemfile file
|
@@ -18,13 +18,24 @@ if File.exist?(file)
|
|
18
18
|
else
|
19
19
|
Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"
|
20
20
|
|
21
|
-
|
21
|
+
if ENV['RAILS_VERSION']
|
22
|
+
if ENV['RAILS_VERSION'] == 'edge'
|
23
|
+
gem 'rails', github: 'rails/rails'
|
24
|
+
ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
|
25
|
+
else
|
26
|
+
gem 'rails', ENV['RAILS_VERSION']
|
27
|
+
end
|
28
|
+
end
|
22
29
|
|
23
|
-
|
24
|
-
|
25
|
-
gem '
|
26
|
-
|
27
|
-
gem '
|
30
|
+
case ENV['RAILS_VERSION']
|
31
|
+
when /^4.2/
|
32
|
+
gem 'responders', '~> 2.0'
|
33
|
+
gem 'sass-rails', '>= 5.0'
|
34
|
+
gem 'coffee-rails', '~> 4.1.0'
|
35
|
+
when /^4.[01]/
|
36
|
+
gem 'sass-rails', '< 5.0'
|
28
37
|
end
|
29
38
|
end
|
30
39
|
# END ENGINE_CART BLOCK
|
40
|
+
|
41
|
+
gem 'blacklight-spotlight', github: 'projectblacklight/spotlight'
|
data/README.md
CHANGED
@@ -20,6 +20,10 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
$ gem install spotlight-resources-iiif
|
22
22
|
|
23
|
+
Then run the engine's generator:
|
24
|
+
|
25
|
+
$ bundle exec rails generate spotlight:resources:iiif:install
|
26
|
+
|
23
27
|
## Usage
|
24
28
|
|
25
29
|
This is a Rails engine gem to be used along with blacklight-spotlight, another Rails engine gem used to build exhibits sites while leveraging the blacklight Rails engine gem.
|
data/Rakefile
CHANGED
@@ -17,23 +17,18 @@ RuboCop::RakeTask.new(:rubocop) do |task|
|
|
17
17
|
task.options = ['-l'] # run lint cops only
|
18
18
|
end
|
19
19
|
|
20
|
-
ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v4.10.4.zip"
|
21
|
-
require 'jettywrapper'
|
22
|
-
|
23
20
|
require 'engine_cart/rake_task'
|
24
21
|
EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc
|
25
22
|
|
26
|
-
|
27
|
-
|
28
|
-
desc 'Run tests in generated test Rails app with generated Solr instance running'
|
29
|
-
task ci: ['engine_cart:generate', 'jetty:clean', 'exhibits:configure_solr'] do
|
23
|
+
task ci: ['engine_cart:generate'] do
|
24
|
+
require 'solr_wrapper'
|
30
25
|
ENV['environment'] = 'test'
|
31
|
-
jetty_params = Jettywrapper.load_config
|
32
|
-
jetty_params[:startup_wait] = 60
|
33
26
|
|
34
|
-
|
35
|
-
|
36
|
-
|
27
|
+
SolrWrapper.wrap(port: '8983') do |solr|
|
28
|
+
solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path(File.dirname(__FILE__)), 'solr', 'conf')) do
|
29
|
+
# run the tests
|
30
|
+
Rake::Task['spec'].invoke
|
31
|
+
end
|
37
32
|
end
|
38
33
|
end
|
39
34
|
|
@@ -42,18 +37,13 @@ task default: [:ci, :rubocop]
|
|
42
37
|
desc 'Run generated test Rails app with generated Solr instance running'
|
43
38
|
task :server do
|
44
39
|
Rake::Task['engine_cart:generate'].invoke
|
40
|
+
require 'solr_wrapper'
|
45
41
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
jetty_params = Jettywrapper.load_config
|
52
|
-
jetty_params[:startup_wait]= 30
|
53
|
-
|
54
|
-
Jettywrapper.wrap(jetty_params) do
|
55
|
-
within_test_app do
|
56
|
-
system "bundle exec rails s"
|
42
|
+
SolrWrapper.wrap(port: '8983') do |solr|
|
43
|
+
solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path(File.dirname(__FILE__)), 'solr', 'conf')) do
|
44
|
+
within_test_app do
|
45
|
+
system 'bundle exec rails s'
|
46
|
+
end
|
57
47
|
end
|
58
48
|
end
|
59
49
|
end
|
@@ -67,7 +57,7 @@ begin
|
|
67
57
|
YARD::Rake::YardocTask.new(:doc) do |yt|
|
68
58
|
yt.files = Dir.glob(File.join(project_root, 'lib', '**', '*.rb')) +
|
69
59
|
[File.join(project_root, 'README.md')]
|
70
|
-
yt.options = ['--output-dir', doc_dest_dir, '--readme', 'README.md', '--title', '
|
60
|
+
yt.options = ['--output-dir', doc_dest_dir, '--readme', 'README.md', '--title', 'Spotlight IIIF Resource Harvester Documentation']
|
71
61
|
end
|
72
62
|
rescue LoadError
|
73
63
|
desc "Generate YARD Documentation"
|
@@ -1,31 +1,8 @@
|
|
1
1
|
module Spotlight
|
2
2
|
module Resources
|
3
|
-
class IiifHarvesterController < Spotlight::
|
4
|
-
|
5
|
-
|
6
|
-
load_and_authorize_resource :exhibit, class: Spotlight::Exhibit
|
7
|
-
before_action :build_resource
|
8
|
-
|
9
|
-
def create
|
10
|
-
if @resource.save_and_index
|
11
|
-
redirect_to spotlight.admin_exhibit_catalog_index_path(current_exhibit, sort: :timestamp)
|
12
|
-
else
|
13
|
-
flash[:error] = @resource.errors.values.join(', ') if @resource.errors.present?
|
14
|
-
redirect_to spotlight.new_exhibit_resource_path(current_exhibit)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
private
|
19
|
-
|
20
|
-
def resource_params
|
21
|
-
params.require(:resources_iiif_harvester).permit(:url)
|
22
|
-
end
|
23
|
-
|
24
|
-
def build_resource
|
25
|
-
@resource ||= Spotlight::Resources::IiifHarvester.create(
|
26
|
-
url: resource_params[:url],
|
27
|
-
exhibit: current_exhibit
|
28
|
-
)
|
3
|
+
class IiifHarvesterController < Spotlight::ResourcesController
|
4
|
+
def resource_class
|
5
|
+
Spotlight::Resources::IiifHarvester
|
29
6
|
end
|
30
7
|
end
|
31
8
|
end
|
@@ -5,27 +5,17 @@ module Spotlight
|
|
5
5
|
# harvest Images from IIIF Manifest and turn them into a Spotlight::Resource
|
6
6
|
# Note: IIIF API : http://iiif.io/api/presentation/2.0
|
7
7
|
class IiifHarvester < Spotlight::Resource
|
8
|
+
self.document_builder_class = Spotlight::Resources::IiifBuilder
|
8
9
|
self.weight = -5000
|
9
10
|
|
10
11
|
validate :valid_url?
|
11
12
|
|
12
|
-
def to_solr
|
13
|
-
return to_enum(:to_solr) { 0 } unless block_given?
|
14
|
-
|
15
|
-
base_doc = super
|
16
|
-
iiif_manifests.each do |manifest|
|
17
|
-
manifest.with_exhibit(exhibit)
|
18
|
-
manifest_solr = manifest.to_solr
|
19
|
-
yield base_doc.merge(manifest_solr) if manifest_solr.present?
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
13
|
def iiif_manifests
|
26
14
|
@iiif_manifests ||= IiifService.parse(url)
|
27
15
|
end
|
28
16
|
|
17
|
+
private
|
18
|
+
|
29
19
|
def valid_url?
|
30
20
|
errors.add(:url, 'Invalid IIIF URL') unless url_is_iiif?(url)
|
31
21
|
end
|
@@ -3,9 +3,11 @@ module Spotlight
|
|
3
3
|
##
|
4
4
|
# A PORO to construct a solr hash for a given IiifManifest
|
5
5
|
class IiifManifest
|
6
|
+
attr_reader :collection
|
6
7
|
def initialize(attrs = {})
|
7
8
|
@url = attrs[:url]
|
8
9
|
@manifest = attrs[:manifest]
|
10
|
+
@collection = attrs[:collection]
|
9
11
|
@solr_hash = {}
|
10
12
|
end
|
11
13
|
|
@@ -13,9 +15,11 @@ module Spotlight
|
|
13
15
|
add_document_id
|
14
16
|
add_label
|
15
17
|
add_thumbnail_url
|
18
|
+
add_full_image_urls
|
16
19
|
add_manifest_url
|
17
20
|
add_image_urls
|
18
21
|
add_metadata
|
22
|
+
add_collection_id
|
19
23
|
solr_hash
|
20
24
|
end
|
21
25
|
|
@@ -23,19 +27,29 @@ module Spotlight
|
|
23
27
|
@exhibit = e
|
24
28
|
end
|
25
29
|
|
30
|
+
def compound_id
|
31
|
+
Digest::MD5.hexdigest("#{exhibit.id}-#{url}")
|
32
|
+
end
|
33
|
+
|
26
34
|
private
|
27
35
|
|
28
36
|
attr_reader :url, :manifest, :exhibit, :solr_hash
|
29
37
|
delegate :blacklight_config, to: :exhibit
|
30
38
|
|
31
|
-
def compound_id
|
32
|
-
Digest::MD5.hexdigest("#{exhibit.id}-#{url}")
|
33
|
-
end
|
34
|
-
|
35
39
|
def add_document_id
|
36
40
|
solr_hash[exhibit.blacklight_config.document_model.unique_key.to_sym] = compound_id
|
37
41
|
end
|
38
42
|
|
43
|
+
def add_collection_id
|
44
|
+
if collection
|
45
|
+
solr_hash[collection_id_field] = [collection.compound_id]
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def collection_id_field
|
50
|
+
Spotlight::Resources::Iiif::Engine.config.collection_id_field
|
51
|
+
end
|
52
|
+
|
39
53
|
def add_manifest_url
|
40
54
|
solr_hash[Spotlight::Resources::Iiif::Engine.config.iiif_manifest_field] = url
|
41
55
|
end
|
@@ -45,6 +59,11 @@ module Spotlight
|
|
45
59
|
solr_hash[thumbnail_field] = manifest['thumbnail']['@id']
|
46
60
|
end
|
47
61
|
|
62
|
+
def add_full_image_urls
|
63
|
+
return unless full_image_field && full_image_url
|
64
|
+
solr_hash[full_image_field] = full_image_url
|
65
|
+
end
|
66
|
+
|
48
67
|
def add_label
|
49
68
|
return unless title_field && manifest.try(:label)
|
50
69
|
solr_hash[title_field] = manifest.label
|
@@ -72,7 +91,7 @@ module Spotlight
|
|
72
91
|
|
73
92
|
def create_sidecars_for(*keys)
|
74
93
|
missing_keys(keys).each do |k|
|
75
|
-
exhibit.custom_fields.create! label: k
|
94
|
+
exhibit.custom_fields.create! label: k, readonly_field: true
|
76
95
|
end
|
77
96
|
@exhibit_custom_fields = nil
|
78
97
|
end
|
@@ -99,6 +118,10 @@ module Spotlight
|
|
99
118
|
end
|
100
119
|
end
|
101
120
|
|
121
|
+
def full_image_url
|
122
|
+
resources.first.try(:[], '@id')
|
123
|
+
end
|
124
|
+
|
102
125
|
def resources
|
103
126
|
@resources ||= sequences
|
104
127
|
.flat_map(&:canvases)
|
@@ -114,6 +137,10 @@ module Spotlight
|
|
114
137
|
blacklight_config.index.try(:thumbnail_field)
|
115
138
|
end
|
116
139
|
|
140
|
+
def full_image_field
|
141
|
+
Spotlight::Engine.config.full_image_field
|
142
|
+
end
|
143
|
+
|
117
144
|
def tile_source_field
|
118
145
|
blacklight_config.show.try(:tile_source_field)
|
119
146
|
end
|
@@ -20,10 +20,13 @@ module Spotlight
|
|
20
20
|
[create_iiif_manifest(object)]
|
21
21
|
else
|
22
22
|
things = []
|
23
|
-
|
23
|
+
if collection?
|
24
|
+
self_manifest = create_iiif_manifest(object)
|
25
|
+
things << self_manifest
|
26
|
+
end
|
24
27
|
(object.try(:manifests) || []).each do |manifest|
|
25
28
|
things << create_iiif_manifest(
|
26
|
-
self.class.new(manifest['@id']).object
|
29
|
+
self.class.new(manifest['@id']).object, self_manifest
|
27
30
|
)
|
28
31
|
end
|
29
32
|
things
|
@@ -65,8 +68,8 @@ module Spotlight
|
|
65
68
|
end
|
66
69
|
end
|
67
70
|
|
68
|
-
def create_iiif_manifest(manifest)
|
69
|
-
IiifManifest.new(url: manifest['@id'], manifest: manifest)
|
71
|
+
def create_iiif_manifest(manifest, collection = nil)
|
72
|
+
IiifManifest.new(url: manifest['@id'], manifest: manifest, collection: collection)
|
70
73
|
end
|
71
74
|
|
72
75
|
def manifest?
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Spotlight
|
2
|
+
module Resources
|
3
|
+
# transforms a IiifHarvester into solr documents
|
4
|
+
class IiifBuilder < Spotlight::SolrDocumentBuilder
|
5
|
+
def to_solr
|
6
|
+
return to_enum(:to_solr) { 0 } unless block_given?
|
7
|
+
|
8
|
+
base_doc = super
|
9
|
+
resource.iiif_manifests.each do |manifest|
|
10
|
+
manifest.with_exhibit(exhibit)
|
11
|
+
manifest_solr = manifest.to_solr
|
12
|
+
yield base_doc.merge(manifest_solr) if manifest_solr.present?
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= bootstrap_form_for([spotlight_resources_iiif_engine, current_exhibit, Spotlight::Resources::IiifHarvester
|
1
|
+
<%= bootstrap_form_for([spotlight_resources_iiif_engine, current_exhibit, @resource.becomes(Spotlight::Resources::IiifHarvester)], as: :resource, layout: :horizontal, label_col: 'col-md-2', control_col: 'col-sm-6 col-md-6' ) do |f| %>
|
2
2
|
<%= f.text_field :url, help: t('.url-field.help'), label: t('.manifest') %>
|
3
3
|
<div class="form-actions">
|
4
4
|
<div class="primary-actions">
|
data/config/routes.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Spotlight::Resources::Iiif::Engine.routes.draw do
|
2
2
|
resources :exhibits, only: [] do
|
3
|
-
|
3
|
+
resources :iiif_harvesters, controller: :"spotlight/resources/iiif_harvester", only: :create, as: 'resources_iiif_harvesters'
|
4
4
|
end
|
5
5
|
end
|
@@ -5,6 +5,7 @@ module Spotlight::Resources::Iiif
|
|
5
5
|
Spotlight::Resources::Iiif::Engine.config.resource_partial = 'spotlight/resources/iiif/form'
|
6
6
|
Spotlight::Resources::Iiif::Engine.config.metadata_class = -> { Spotlight::Resources::IiifManifest::Metadata }
|
7
7
|
Spotlight::Resources::Iiif::Engine.config.iiif_manifest_field = :content_metadata_iiif_manifest_ssm
|
8
|
+
Spotlight::Resources::Iiif::Engine.config.collection_id_field = :collection_id_ssim
|
8
9
|
|
9
10
|
|
10
11
|
initializer 'spotlight.resources.iiif.initialize' do
|
@@ -0,0 +1,347 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<schema name="Hydra" version="1.5">
|
3
|
+
<!-- NOTE: various comments and unused configuration possibilities have been purged
|
4
|
+
from this file. Please refer to http://wiki.apache.org/solr/SchemaXml,
|
5
|
+
as well as the default schema file included with Solr -->
|
6
|
+
|
7
|
+
<uniqueKey>id</uniqueKey>
|
8
|
+
|
9
|
+
<fields>
|
10
|
+
<field name="id" type="string" stored="true" indexed="true" multiValued="false" required="true"/>
|
11
|
+
<field name="_version_" type="long" indexed="true" stored="true"/>
|
12
|
+
<field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
|
13
|
+
|
14
|
+
<field name="lat" type="tdouble" stored="true" indexed="true" multiValued="false"/>
|
15
|
+
<field name="lng" type="tdouble" stored="true" indexed="true" multiValued="false"/>
|
16
|
+
<field name="original_pid_tesim" type="pid_text" stored="true" indexed="true" multiValued="true"/>
|
17
|
+
|
18
|
+
<field name="full_title_ng" type="text_en_ng" stored="false" indexed="true" multiValued="true"/>
|
19
|
+
<field name="id_ng" type="text_en_ng" stored="false" indexed="true" multiValued="false"/>
|
20
|
+
|
21
|
+
<dynamicField name="*_bbox" type="location_rpt" stored="true" indexed="true"/>
|
22
|
+
<!-- NOTE: not all possible Solr field types are represented in the dynamic fields -->
|
23
|
+
|
24
|
+
<!-- text (_t...) -->
|
25
|
+
<!--
|
26
|
+
<dynamicField name="*_ti" type="text" stored="false" indexed="true" multiValued="false"/>
|
27
|
+
<dynamicField name="*_tim" type="text" stored="false" indexed="true" multiValued="true"/>
|
28
|
+
-->
|
29
|
+
<dynamicField name="*_ts" type="text" stored="true" indexed="false" multiValued="false"/>
|
30
|
+
<dynamicField name="*_tsm" type="text" stored="true" indexed="false" multiValued="true"/>
|
31
|
+
<dynamicField name="*_tsi" type="text" stored="true" indexed="true" multiValued="false"/>
|
32
|
+
<dynamicField name="*_tsim" type="text" stored="true" indexed="true" multiValued="true"/>
|
33
|
+
<!--
|
34
|
+
<dynamicField name="*_tiv" type="text" stored="false" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
|
35
|
+
<dynamicField name="*_timv" type="text" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
|
36
|
+
-->
|
37
|
+
<dynamicField name="*_tsiv" type="text" stored="true" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
|
38
|
+
<dynamicField name="*_tsimv" type="text" stored="true" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
|
39
|
+
|
40
|
+
<!-- English text (_te...) -->
|
41
|
+
<!--
|
42
|
+
<dynamicField name="*_tei" type="text_en" stored="false" indexed="true" multiValued="false"/>
|
43
|
+
<dynamicField name="*_teim" type="text_en" stored="false" indexed="true" multiValued="true"/>
|
44
|
+
-->
|
45
|
+
<dynamicField name="*_tes" type="text_en" stored="true" indexed="false" multiValued="false"/>
|
46
|
+
<dynamicField name="*_tesm" type="text_en" stored="true" indexed="false" multiValued="true"/>
|
47
|
+
<dynamicField name="*_tesi" type="text_en" stored="true" indexed="true" multiValued="false"/>
|
48
|
+
<dynamicField name="*_tesim" type="text_en" stored="true" indexed="true" multiValued="true"/>
|
49
|
+
<!--
|
50
|
+
<dynamicField name="*_teiv" type="text_en" stored="false" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
|
51
|
+
<dynamicField name="*_teimv" type="text_en" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
|
52
|
+
-->
|
53
|
+
<dynamicField name="*_tesiv" type="text_en" stored="true" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
|
54
|
+
<dynamicField name="*_tesimv" type="text_en" stored="true" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
|
55
|
+
|
56
|
+
<!-- string (_s...) -->
|
57
|
+
<!--
|
58
|
+
<dynamicField name="*_si" type="string" stored="false" indexed="true" multiValued="false"/>
|
59
|
+
<dynamicField name="*_sim" type="string" stored="false" indexed="true" multiValued="true"/>
|
60
|
+
-->
|
61
|
+
<dynamicField name="*_ss" type="string" stored="true" indexed="false" multiValued="false"/>
|
62
|
+
<dynamicField name="*_ssm" type="string" stored="true" indexed="false" multiValued="true"/>
|
63
|
+
<dynamicField name="*_ssi" type="string" stored="true" indexed="true" multiValued="false"/>
|
64
|
+
<dynamicField name="*_ssim" type="string" stored="true" indexed="true" multiValued="true"/>
|
65
|
+
<!--
|
66
|
+
<dynamicField name="*_ssort" type="alphaSort" stored="false" indexed="true" multiValued="false"/>
|
67
|
+
-->
|
68
|
+
|
69
|
+
<!-- integer (_i...) -->
|
70
|
+
<!--
|
71
|
+
<dynamicField name="*_ii" type="int" stored="false" indexed="true" multiValued="false"/>
|
72
|
+
<dynamicField name="*_iim" type="int" stored="false" indexed="true" multiValued="true"/>
|
73
|
+
-->
|
74
|
+
<dynamicField name="*_is" type="int" stored="true" indexed="false" multiValued="false"/>
|
75
|
+
<dynamicField name="*_ism" type="int" stored="true" indexed="false" multiValued="true"/>
|
76
|
+
<dynamicField name="*_isi" type="int" stored="true" indexed="true" multiValued="false"/>
|
77
|
+
<dynamicField name="*_isim" type="int" stored="true" indexed="true" multiValued="true"/>
|
78
|
+
|
79
|
+
<!-- trie integer (_it...) (for faster range queries) -->
|
80
|
+
<!--
|
81
|
+
<dynamicField name="*_iti" type="tint" stored="false" indexed="true" multiValued="false"/>
|
82
|
+
<dynamicField name="*_itim" type="tint" stored="false" indexed="true" multiValued="true"/>
|
83
|
+
-->
|
84
|
+
<dynamicField name="*_its" type="tint" stored="true" indexed="false" multiValued="false"/>
|
85
|
+
<dynamicField name="*_itsm" type="tint" stored="true" indexed="false" multiValued="true"/>
|
86
|
+
<dynamicField name="*_itsi" type="tint" stored="true" indexed="true" multiValued="false"/>
|
87
|
+
<dynamicField name="*_itsim" type="tint" stored="true" indexed="true" multiValued="true"/>
|
88
|
+
|
89
|
+
<!-- date (_dt...) -->
|
90
|
+
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z
|
91
|
+
Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z -->
|
92
|
+
<!--
|
93
|
+
<dynamicField name="*_dti" type="date" stored="false" indexed="true" multiValued="false"/>
|
94
|
+
<dynamicField name="*_dtim" type="date" stored="false" indexed="true" multiValued="true"/>
|
95
|
+
-->
|
96
|
+
<dynamicField name="*_dts" type="date" stored="true" indexed="false" multiValued="false"/>
|
97
|
+
<dynamicField name="*_dtsm" type="date" stored="true" indexed="false" multiValued="true"/>
|
98
|
+
<dynamicField name="*_dtsi" type="date" stored="true" indexed="true" multiValued="false"/>
|
99
|
+
<dynamicField name="*_dtsim" type="date" stored="true" indexed="true" multiValued="true"/>
|
100
|
+
|
101
|
+
<!-- trie date (_dtt...) (for faster range queries) -->
|
102
|
+
<!--
|
103
|
+
<dynamicField name="*_dtti" type="tdate" stored="false" indexed="true" multiValued="false"/>
|
104
|
+
<dynamicField name="*_dttim" type="tdate" stored="false" indexed="true" multiValued="true"/>
|
105
|
+
-->
|
106
|
+
<dynamicField name="*_dtts" type="tdate" stored="true" indexed="false" multiValued="false"/>
|
107
|
+
<dynamicField name="*_dttsm" type="tdate" stored="true" indexed="false" multiValued="true"/>
|
108
|
+
<dynamicField name="*_dttsi" type="tdate" stored="true" indexed="true" multiValued="false"/>
|
109
|
+
<dynamicField name="*_dttsim" type="tdate" stored="true" indexed="true" multiValued="true"/>
|
110
|
+
|
111
|
+
<!-- long (_l...) -->
|
112
|
+
<!--
|
113
|
+
<dynamicField name="*_li" type="long" stored="false" indexed="true" multiValued="false"/>
|
114
|
+
<dynamicField name="*_lim" type="long" stored="false" indexed="true" multiValued="true"/>
|
115
|
+
-->
|
116
|
+
<dynamicField name="*_ls" type="long" stored="true" indexed="false" multiValued="false"/>
|
117
|
+
<dynamicField name="*_lsm" type="long" stored="true" indexed="false" multiValued="true"/>
|
118
|
+
<dynamicField name="*_lsi" type="long" stored="true" indexed="true" multiValued="false"/>
|
119
|
+
<dynamicField name="*_lsim" type="long" stored="true" indexed="true" multiValued="true"/>
|
120
|
+
|
121
|
+
<!-- trie long (_lt...) (for faster range queries) -->
|
122
|
+
<!--
|
123
|
+
<dynamicField name="*_lti" type="tlong" stored="false" indexed="true" multiValued="false"/>
|
124
|
+
<dynamicField name="*_ltim" type="tlong" stored="false" indexed="true" multiValued="true"/>
|
125
|
+
-->
|
126
|
+
<dynamicField name="*_lts" type="tlong" stored="true" indexed="false" multiValued="false"/>
|
127
|
+
<dynamicField name="*_ltsm" type="tlong" stored="true" indexed="false" multiValued="true"/>
|
128
|
+
<dynamicField name="*_ltsi" type="tlong" stored="true" indexed="true" multiValued="false"/>
|
129
|
+
<dynamicField name="*_ltsim" type="tlong" stored="true" indexed="true" multiValued="true"/>
|
130
|
+
|
131
|
+
<!-- double (_db...) -->
|
132
|
+
<!--
|
133
|
+
<dynamicField name="*_dbi" type="double" stored="false" indexed="true" multiValued="false"/>
|
134
|
+
<dynamicField name="*_dbim" type="double" stored="false" indexed="true" multiValued="true"/>
|
135
|
+
-->
|
136
|
+
<dynamicField name="*_dbs" type="double" stored="true" indexed="false" multiValued="false"/>
|
137
|
+
<dynamicField name="*_dbsm" type="double" stored="true" indexed="false" multiValued="true"/>
|
138
|
+
<dynamicField name="*_dbsi" type="double" stored="true" indexed="true" multiValued="false"/>
|
139
|
+
<dynamicField name="*_dbsim" type="double" stored="true" indexed="true" multiValued="true"/>
|
140
|
+
|
141
|
+
<!-- trie double (_dbt...) (for faster range queries) -->
|
142
|
+
<!--
|
143
|
+
<dynamicField name="*_dbti" type="tdouble" stored="false" indexed="true" multiValued="false"/>
|
144
|
+
<dynamicField name="*_dbtim" type="tdouble" stored="false" indexed="true" multiValued="true"/>
|
145
|
+
-->
|
146
|
+
<dynamicField name="*_dbts" type="tdouble" stored="true" indexed="false" multiValued="false"/>
|
147
|
+
<dynamicField name="*_dbtsm" type="tdouble" stored="true" indexed="false" multiValued="true"/>
|
148
|
+
<dynamicField name="*_dbtsi" type="tdouble" stored="true" indexed="true" multiValued="false"/>
|
149
|
+
<dynamicField name="*_dbtsim" type="tdouble" stored="true" indexed="true" multiValued="true"/>
|
150
|
+
|
151
|
+
<!-- float (_f...) -->
|
152
|
+
<!--
|
153
|
+
<dynamicField name="*_fi" type="float" stored="false" indexed="true" multiValued="false"/>
|
154
|
+
<dynamicField name="*_fim" type="float" stored="false" indexed="true" multiValued="true"/>
|
155
|
+
-->
|
156
|
+
<dynamicField name="*_fs" type="float" stored="true" indexed="false" multiValued="false"/>
|
157
|
+
<dynamicField name="*_fsm" type="float" stored="true" indexed="false" multiValued="true"/>
|
158
|
+
<dynamicField name="*_fsi" type="float" stored="true" indexed="true" multiValued="false"/>
|
159
|
+
<dynamicField name="*_fsim" type="float" stored="true" indexed="true" multiValued="true"/>
|
160
|
+
|
161
|
+
<!-- trie float (_ft...) (for faster range queries) -->
|
162
|
+
<!--
|
163
|
+
<dynamicField name="*_fti" type="tfloat" stored="false" indexed="true" multiValued="false"/>
|
164
|
+
<dynamicField name="*_ftim" type="tfloat" stored="false" indexed="true" multiValued="true"/>
|
165
|
+
-->
|
166
|
+
<dynamicField name="*_fts" type="tfloat" stored="true" indexed="false" multiValued="false"/>
|
167
|
+
<dynamicField name="*_ftsm" type="tfloat" stored="true" indexed="false" multiValued="true"/>
|
168
|
+
<dynamicField name="*_ftsi" type="tfloat" stored="true" indexed="true" multiValued="false"/>
|
169
|
+
<dynamicField name="*_ftsim" type="tfloat" stored="true" indexed="true" multiValued="true"/>
|
170
|
+
|
171
|
+
<!-- boolean (_b...) -->
|
172
|
+
<!--
|
173
|
+
<dynamicField name="*_bi" type="boolean" stored="false" indexed="true" multiValued="false"/>
|
174
|
+
-->
|
175
|
+
<dynamicField name="*_bs" type="boolean" stored="true" indexed="false" multiValued="false"/>
|
176
|
+
<dynamicField name="*_bsi" type="boolean" stored="true" indexed="true" multiValued="false"/>
|
177
|
+
|
178
|
+
<!-- Type used to index the lat and lon components for the "location" FieldType -->
|
179
|
+
<!--
|
180
|
+
<dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" />
|
181
|
+
-->
|
182
|
+
|
183
|
+
<!-- location (_ll...) -->
|
184
|
+
<!--
|
185
|
+
<dynamicField name="*_lli" type="location" stored="false" indexed="true" multiValued="false"/>
|
186
|
+
<dynamicField name="*_llim" type="location" stored="false" indexed="true" multiValued="true"/>
|
187
|
+
-->
|
188
|
+
<dynamicField name="*_lls" type="location" stored="true" indexed="false" multiValued="false"/>
|
189
|
+
<dynamicField name="*_llsm" type="location" stored="true" indexed="false" multiValued="true"/>
|
190
|
+
<dynamicField name="*_llsi" type="location" stored="true" indexed="true" multiValued="false"/>
|
191
|
+
<dynamicField name="*_llsim" type="location" stored="true" indexed="true" multiValued="true"/>
|
192
|
+
|
193
|
+
<!-- you must define copyField source and dest fields explicity or schemaBrowser doesn't work -->
|
194
|
+
<field name="all_text_timv" type="text" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
|
195
|
+
|
196
|
+
|
197
|
+
</fields>
|
198
|
+
|
199
|
+
|
200
|
+
<!-- Above, multiple source fields are copied to the [text] field.
|
201
|
+
Another way to map multiple source fields to the same
|
202
|
+
destination field is to use the dynamic field syntax.
|
203
|
+
copyField also supports a maxChars to copy setting. -->
|
204
|
+
|
205
|
+
<copyField source="id" dest="id_ng" maxChars="3000"/>
|
206
|
+
<copyField source="full_title_tesim" dest="full_title_ng" maxChars="3000"/>
|
207
|
+
<copyField source="*_tesim" dest="all_text_timv" maxChars="3000"/>
|
208
|
+
|
209
|
+
<types>
|
210
|
+
<fieldType name="string" class="solr.StrField" sortMissingLast="true" />
|
211
|
+
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
|
212
|
+
<fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
|
213
|
+
|
214
|
+
<!-- Default numeric field types. -->
|
215
|
+
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
|
216
|
+
<fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
|
217
|
+
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
|
218
|
+
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
|
219
|
+
|
220
|
+
<!-- trie numeric field types for faster range queries -->
|
221
|
+
<fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>
|
222
|
+
<fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>
|
223
|
+
<fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>
|
224
|
+
<fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
|
225
|
+
|
226
|
+
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z
|
227
|
+
Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
|
228
|
+
-->
|
229
|
+
<fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
|
230
|
+
<!-- A Trie based date field for faster date range queries and date faceting. -->
|
231
|
+
<fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
|
232
|
+
|
233
|
+
|
234
|
+
<!-- This point type indexes the coordinates as separate fields (subFields)
|
235
|
+
If subFieldType is defined, it references a type, and a dynamic field
|
236
|
+
definition is created matching *___<typename>. Alternately, if
|
237
|
+
subFieldSuffix is defined, that is used to create the subFields.
|
238
|
+
Example: if subFieldType="double", then the coordinates would be
|
239
|
+
indexed in fields myloc_0___double,myloc_1___double.
|
240
|
+
Example: if subFieldSuffix="_d" then the coordinates would be indexed
|
241
|
+
in fields myloc_0_d,myloc_1_d
|
242
|
+
The subFields are an implementation detail of the fieldType, and end
|
243
|
+
users normally should not need to know about them.
|
244
|
+
-->
|
245
|
+
<fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
|
246
|
+
|
247
|
+
<!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
|
248
|
+
<fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
|
249
|
+
|
250
|
+
<!-- An alternative geospatial field type new to Solr 4. It supports multiValued and polygon shapes.
|
251
|
+
For more information about this and other Spatial fields new to Solr 4, see:
|
252
|
+
http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
|
253
|
+
-->
|
254
|
+
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
|
255
|
+
geo="true" distErrPct="0.025" maxDistErr="0.000009" distanceUnits="degrees" />
|
256
|
+
|
257
|
+
<fieldType name="text" class="solr.TextField" omitNorms="false">
|
258
|
+
<analyzer>
|
259
|
+
<tokenizer class="solr.ICUTokenizerFactory"/>
|
260
|
+
<filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
|
261
|
+
<filter class="solr.TrimFilterFactory"/>
|
262
|
+
</analyzer>
|
263
|
+
</fieldType>
|
264
|
+
|
265
|
+
<!-- A text field that only splits on whitespace for exact matching of words -->
|
266
|
+
<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
|
267
|
+
<analyzer>
|
268
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
269
|
+
<filter class="solr.TrimFilterFactory"/>
|
270
|
+
</analyzer>
|
271
|
+
</fieldType>
|
272
|
+
|
273
|
+
<!-- single token analyzed text, for sorting. Punctuation is significant. -->
|
274
|
+
<fieldtype name="alphaSort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
|
275
|
+
<analyzer>
|
276
|
+
<tokenizer class="solr.KeywordTokenizerFactory" />
|
277
|
+
<filter class="solr.ICUFoldingFilterFactory"/>
|
278
|
+
<filter class="solr.TrimFilterFactory" />
|
279
|
+
</analyzer>
|
280
|
+
</fieldtype>
|
281
|
+
|
282
|
+
<!-- A text field with defaults appropriate for English -->
|
283
|
+
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
|
284
|
+
<analyzer>
|
285
|
+
<tokenizer class="solr.ICUTokenizerFactory"/>
|
286
|
+
<filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
|
287
|
+
<filter class="solr.EnglishPossessiveFilterFactory"/>
|
288
|
+
<!-- EnglishMinimalStemFilterFactory is less aggressive than PorterStemFilterFactory: -->
|
289
|
+
<filter class="solr.EnglishMinimalStemFilterFactory"/>
|
290
|
+
<!--
|
291
|
+
<filter class="solr.PorterStemFilterFactory"/>
|
292
|
+
-->
|
293
|
+
<filter class="solr.TrimFilterFactory"/>
|
294
|
+
</analyzer>
|
295
|
+
</fieldType>
|
296
|
+
|
297
|
+
<!-- A text field with defaults appropriate for English an NGrams -->
|
298
|
+
<fieldType name="text_en_ng" class="solr.TextField" positionIncrementGap="100">
|
299
|
+
<analyzer type="index">
|
300
|
+
<tokenizer class="solr.ICUTokenizerFactory"/>
|
301
|
+
<filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
|
302
|
+
<filter class="solr.EnglishPossessiveFilterFactory"/>
|
303
|
+
<!-- EnglishMinimalStemFilterFactory is less aggressive than PorterStemFilterFactory: -->
|
304
|
+
<filter class="solr.EnglishMinimalStemFilterFactory"/>
|
305
|
+
<filter class="solr.TrimFilterFactory"/>
|
306
|
+
<filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="15" />
|
307
|
+
</analyzer>
|
308
|
+
|
309
|
+
<analyzer type="index">
|
310
|
+
<tokenizer class="solr.ICUTokenizerFactory"/>
|
311
|
+
<filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
|
312
|
+
<filter class="solr.EnglishPossessiveFilterFactory"/>
|
313
|
+
<!-- EnglishMinimalStemFilterFactory is less aggressive than PorterStemFilterFactory: -->
|
314
|
+
<filter class="solr.EnglishMinimalStemFilterFactory"/>
|
315
|
+
<filter class="solr.TrimFilterFactory"/>
|
316
|
+
</analyzer>
|
317
|
+
</fieldType>
|
318
|
+
|
319
|
+
<fieldType name="pid_text" class="solr.TextField" positionIncrementGap="100">
|
320
|
+
<analyzer>
|
321
|
+
<tokenizer class="solr.KeywordTokenizerFactory"/>
|
322
|
+
</analyzer>
|
323
|
+
</fieldType>
|
324
|
+
|
325
|
+
<!-- queries for paths match documents at that path, or in descendent paths -->
|
326
|
+
<fieldType name="descendent_path" class="solr.TextField">
|
327
|
+
<analyzer type="index">
|
328
|
+
<tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
|
329
|
+
</analyzer>
|
330
|
+
<analyzer type="query">
|
331
|
+
<tokenizer class="solr.KeywordTokenizerFactory" />
|
332
|
+
</analyzer>
|
333
|
+
</fieldType>
|
334
|
+
|
335
|
+
<!-- queries for paths match documents at that path, or in ancestor paths -->
|
336
|
+
<fieldType name="ancestor_path" class="solr.TextField">
|
337
|
+
<analyzer type="index">
|
338
|
+
<tokenizer class="solr.KeywordTokenizerFactory" />
|
339
|
+
</analyzer>
|
340
|
+
<analyzer type="query">
|
341
|
+
<tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
|
342
|
+
</analyzer>
|
343
|
+
</fieldType>
|
344
|
+
|
345
|
+
</types>
|
346
|
+
|
347
|
+
</schema>
|
@@ -0,0 +1,163 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<config>
|
3
|
+
<!-- NOTE: various comments and unused configuration possibilities have been purged
|
4
|
+
from this file. Please refer to http://wiki.apache.org/solr/SolrConfigXml,
|
5
|
+
as well as the default solrconfig file included with Solr -->
|
6
|
+
|
7
|
+
<abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
|
8
|
+
|
9
|
+
<luceneMatchVersion>6.1.0</luceneMatchVersion>
|
10
|
+
|
11
|
+
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
|
12
|
+
|
13
|
+
<updateHandler class="solr.DirectUpdateHandler2">
|
14
|
+
<updateLog>
|
15
|
+
<str name="dir">${solr.core0.data.dir:}</str>
|
16
|
+
</updateLog>
|
17
|
+
</updateHandler>
|
18
|
+
|
19
|
+
<!-- solr lib dirs -->
|
20
|
+
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
|
21
|
+
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
|
22
|
+
|
23
|
+
<dataDir>${solr.data.dir:}</dataDir>
|
24
|
+
|
25
|
+
<requestHandler name="search" class="solr.SearchHandler" default="true">
|
26
|
+
<!-- default values for query parameters can be specified, these
|
27
|
+
will be overridden by parameters in the request
|
28
|
+
-->
|
29
|
+
<lst name="defaults">
|
30
|
+
<str name="defType">edismax</str>
|
31
|
+
<str name="echoParams">explicit</str>
|
32
|
+
<str name="q.alt">*:*</str>
|
33
|
+
<str name="mm">2<-1 5<-2 6<90%</str>
|
34
|
+
<int name="qs">1</int>
|
35
|
+
<int name="ps">2</int>
|
36
|
+
<float name="tie">0.01</float>
|
37
|
+
<!-- this qf and pf are used by default, if not otherwise specified by
|
38
|
+
client. The default blacklight_config will use these for the
|
39
|
+
"keywords" search. See the author_qf/author_pf, title_qf, etc
|
40
|
+
below, which the default blacklight_config will specify for
|
41
|
+
those searches. You may also be interested in:
|
42
|
+
http://wiki.apache.org/solr/LocalParams
|
43
|
+
-->
|
44
|
+
<str name="qf">
|
45
|
+
id
|
46
|
+
full_title_tesim
|
47
|
+
short_title_tesim
|
48
|
+
alternative_title_tesim
|
49
|
+
active_fedora_model_ssi
|
50
|
+
title_tesim
|
51
|
+
author_tesim
|
52
|
+
subject_tesim
|
53
|
+
all_text_timv
|
54
|
+
</str>
|
55
|
+
<str name="pf">
|
56
|
+
all_text_timv^10
|
57
|
+
</str>
|
58
|
+
|
59
|
+
<str name="author_qf">
|
60
|
+
author_tesim
|
61
|
+
</str>
|
62
|
+
<str name="author_pf">
|
63
|
+
</str>
|
64
|
+
<str name="title_qf">
|
65
|
+
title_tesim
|
66
|
+
full_title_tesim
|
67
|
+
short_title_tesim
|
68
|
+
alternative_title_tesim
|
69
|
+
</str>
|
70
|
+
<str name="title_pf">
|
71
|
+
</str>
|
72
|
+
<str name="subject_qf">
|
73
|
+
subject_tesim
|
74
|
+
</str>
|
75
|
+
<str name="subject_pf">
|
76
|
+
</str>
|
77
|
+
|
78
|
+
<str name="fl">
|
79
|
+
*,
|
80
|
+
score
|
81
|
+
</str>
|
82
|
+
|
83
|
+
<str name="facet">true</str>
|
84
|
+
<str name="facet.mincount">1</str>
|
85
|
+
<str name="facet.limit">10</str>
|
86
|
+
<str name="facet.field">active_fedora_model_ssi</str>
|
87
|
+
<str name="facet.field">subject_ssim</str>
|
88
|
+
|
89
|
+
<str name="spellcheck">true</str>
|
90
|
+
<str name="spellcheck.dictionary">default</str>
|
91
|
+
<str name="spellcheck.onlyMorePopular">true</str>
|
92
|
+
<str name="spellcheck.extendedResults">true</str>
|
93
|
+
<str name="spellcheck.collate">false</str>
|
94
|
+
<str name="spellcheck.count">5</str>
|
95
|
+
|
96
|
+
</lst>
|
97
|
+
<arr name="last-components">
|
98
|
+
<str>spellcheck</str>
|
99
|
+
</arr>
|
100
|
+
</requestHandler>
|
101
|
+
|
102
|
+
<requestHandler name="permissions" class="solr.SearchHandler" >
|
103
|
+
<lst name="defaults">
|
104
|
+
<str name="facet">off</str>
|
105
|
+
<str name="echoParams">all</str>
|
106
|
+
<str name="rows">1</str>
|
107
|
+
<str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
|
108
|
+
<str name="fl">
|
109
|
+
id,
|
110
|
+
access_ssim,
|
111
|
+
discover_access_group_ssim,discover_access_person_ssim,
|
112
|
+
read_access_group_ssim,read_access_person_ssim,
|
113
|
+
edit_access_group_ssim,edit_access_person_ssim,
|
114
|
+
depositor_ti,
|
115
|
+
embargo_release_date_dtsi
|
116
|
+
inheritable_access_ssim,
|
117
|
+
inheritable_discover_access_group_ssim,inheritable_discover_access_person_ssim,
|
118
|
+
inheritable_read_access_group_ssim,inheritable_read_access_person_ssim,
|
119
|
+
inheritable_edit_access_group_ssim,inheritable_edit_access_person_ssim,
|
120
|
+
inheritable_embargo_release_date_dtsi
|
121
|
+
</str>
|
122
|
+
</lst>
|
123
|
+
</requestHandler>
|
124
|
+
|
125
|
+
<requestHandler name="standard" class="solr.SearchHandler">
|
126
|
+
<lst name="defaults">
|
127
|
+
<str name="echoParams">explicit</str>
|
128
|
+
<str name="defType">lucene</str>
|
129
|
+
</lst>
|
130
|
+
</requestHandler>
|
131
|
+
|
132
|
+
<!-- for requests to get a single document; use id=666 instead of q=id:666 -->
|
133
|
+
<requestHandler name="document" class="solr.SearchHandler" >
|
134
|
+
<lst name="defaults">
|
135
|
+
<str name="echoParams">all</str>
|
136
|
+
<str name="fl">*</str>
|
137
|
+
<str name="rows">1</str>
|
138
|
+
<str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
|
139
|
+
</lst>
|
140
|
+
</requestHandler>
|
141
|
+
|
142
|
+
|
143
|
+
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
144
|
+
<str name="queryAnalyzerFieldType">textSpell</str>
|
145
|
+
<!-- Multiple "Spell Checkers" can be declared and used by this component
|
146
|
+
(e.g. for title_spell field)
|
147
|
+
-->
|
148
|
+
<lst name="spellchecker">
|
149
|
+
<str name="name">default</str>
|
150
|
+
<str name="field">spell</str>
|
151
|
+
<str name="spellcheckIndexDir">./spell</str>
|
152
|
+
<str name="buildOnOptimize">true</str>
|
153
|
+
</lst>
|
154
|
+
</searchComponent>
|
155
|
+
|
156
|
+
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
157
|
+
|
158
|
+
<requestDispatcher handleSelect="true" >
|
159
|
+
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
|
160
|
+
</requestDispatcher>
|
161
|
+
|
162
|
+
<requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
|
163
|
+
</config>
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "blacklight-spotlight"
|
21
|
+
spec.add_dependency "blacklight-spotlight", "~> 0.26"
|
22
22
|
spec.add_dependency "faraday"
|
23
23
|
spec.add_dependency "iiif-presentation"
|
24
24
|
|
@@ -30,12 +30,12 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'database_cleaner', '~> 1.3'
|
31
31
|
# spec.add_development_dependency 'poltergeist', '>= 1.5.0' # for js testing using phantomjs
|
32
32
|
spec.add_development_dependency "coveralls"
|
33
|
-
spec.add_development_dependency
|
33
|
+
spec.add_development_dependency 'rubocop', '~> 0.37.2'
|
34
34
|
spec.add_development_dependency "rubocop-rspec"
|
35
35
|
spec.add_development_dependency "yard"
|
36
|
+
spec.add_development_dependency "riiif"
|
36
37
|
spec.add_development_dependency "engine_cart"
|
37
|
-
spec.add_development_dependency "
|
38
|
-
spec.add_development_dependency 'exhibits_solr_conf'
|
38
|
+
spec.add_development_dependency "solr_wrapper"
|
39
39
|
# FIXME: we shouldn't need explicit sitemap_generator dependency here as it should come with spotlight
|
40
40
|
# but travis fails without it (though tests run fine locally)
|
41
41
|
# cbeer: "we’re injecting the dependency into the host app. maybe we’re just
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spotlight-resources-iiif
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naomi Dushay
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-08-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: blacklight-spotlight
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '0'
|
20
|
+
version: '0.26'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '0'
|
27
|
+
version: '0.26'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: faraday
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,16 +155,16 @@ dependencies:
|
|
155
155
|
name: rubocop
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- - "
|
158
|
+
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version:
|
160
|
+
version: 0.37.2
|
161
161
|
type: :development
|
162
162
|
prerelease: false
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
|
-
- - "
|
165
|
+
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
|
-
version:
|
167
|
+
version: 0.37.2
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: rubocop-rspec
|
170
170
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,7 +194,7 @@ dependencies:
|
|
194
194
|
- !ruby/object:Gem::Version
|
195
195
|
version: '0'
|
196
196
|
- !ruby/object:Gem::Dependency
|
197
|
-
name:
|
197
|
+
name: riiif
|
198
198
|
requirement: !ruby/object:Gem::Requirement
|
199
199
|
requirements:
|
200
200
|
- - ">="
|
@@ -208,7 +208,7 @@ dependencies:
|
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '0'
|
210
210
|
- !ruby/object:Gem::Dependency
|
211
|
-
name:
|
211
|
+
name: engine_cart
|
212
212
|
requirement: !ruby/object:Gem::Requirement
|
213
213
|
requirements:
|
214
214
|
- - ">="
|
@@ -222,7 +222,7 @@ dependencies:
|
|
222
222
|
- !ruby/object:Gem::Version
|
223
223
|
version: '0'
|
224
224
|
- !ruby/object:Gem::Dependency
|
225
|
-
name:
|
225
|
+
name: solr_wrapper
|
226
226
|
requirement: !ruby/object:Gem::Requirement
|
227
227
|
requirements:
|
228
228
|
- - ">="
|
@@ -262,6 +262,7 @@ files:
|
|
262
262
|
- ".rspec"
|
263
263
|
- ".rubocop.yml"
|
264
264
|
- ".rubocop_todo.yml"
|
265
|
+
- ".solr_wrapper.yml"
|
265
266
|
- ".travis.yml"
|
266
267
|
- Gemfile
|
267
268
|
- LICENSE.txt
|
@@ -271,6 +272,7 @@ files:
|
|
271
272
|
- app/models/spotlight/resources/iiif_harvester.rb
|
272
273
|
- app/models/spotlight/resources/iiif_manifest.rb
|
273
274
|
- app/models/spotlight/resources/iiif_service.rb
|
275
|
+
- app/services/spotlight/resources/iiif_builder.rb
|
274
276
|
- app/views/spotlight/resources/iiif/_form.html.erb
|
275
277
|
- bin/console
|
276
278
|
- bin/setup
|
@@ -281,6 +283,8 @@ files:
|
|
281
283
|
- lib/spotlight/resources/iiif.rb
|
282
284
|
- lib/spotlight/resources/iiif/engine.rb
|
283
285
|
- lib/spotlight/resources/iiif/version.rb
|
286
|
+
- solr/conf/schema.xml
|
287
|
+
- solr/conf/solrconfig.xml
|
284
288
|
- spotlight-resources-iiif.gemspec
|
285
289
|
homepage: https://github.com/sul-dlss/spotlight-resources-iiif
|
286
290
|
licenses:
|
@@ -302,9 +306,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
302
306
|
version: '0'
|
303
307
|
requirements: []
|
304
308
|
rubyforge_project:
|
305
|
-
rubygems_version: 2.
|
309
|
+
rubygems_version: 2.5.1
|
306
310
|
signing_key:
|
307
311
|
specification_version: 4
|
308
312
|
summary: Spotlight Resource Indexer for IIIF manifests or collections.
|
309
313
|
test_files: []
|
310
|
-
has_rdoc:
|