geoblacklight_sidecar_images 0.9.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +4 -4
- data/.solr_wrapper.yml +0 -1
- data/README.md +10 -16
- data/app/assets/stylesheets/geoblacklight_sidecar_images/modules/_results.scss +32 -8
- data/app/models/concerns/wms_rewrite_concern.rb +1 -1
- data/app/services/geoblacklight_sidecar_images/image_service/wms.rb +1 -1
- data/app/services/geoblacklight_sidecar_images/image_service.rb +1 -1
- data/geoblacklight_sidecar_images.gemspec +2 -2
- data/lib/generators/geoblacklight_sidecar_images/helpers_generator.rb +21 -0
- data/lib/generators/geoblacklight_sidecar_images/install_generator.rb +7 -1
- data/lib/generators/geoblacklight_sidecar_images/templates/helpers/blacklight/layout_helper_behavior.rb +110 -0
- data/lib/generators/geoblacklight_sidecar_images/templates/views/catalog/_index_split_default.html.erb +25 -24
- data/lib/geoblacklight_sidecar_images/version.rb +1 -1
- data/lib/tasks/geoblacklight_sidecar_images_tasks.rake +1 -1
- data/solr/conf/schema.xml +60 -58
- data/solr/conf/solrconfig.xml +29 -29
- data/spec/fixtures/files/actual-polygon1.json +33 -18
- data/spec/fixtures/files/esri-dynamic-layer-all-layers.json +34 -25
- data/spec/fixtures/files/esri-image-map-layer.json +36 -26
- data/spec/fixtures/files/esri-tiled_map_layer.json +33 -18
- data/spec/fixtures/files/placeholder.json +38 -0
- data/spec/fixtures/files/public_iiif_princeton.json +41 -26
- data/spec/fixtures/files/umich_iiif_jpg.json +48 -25
- data/spec/fixtures/files/umn_iiif_jpg.json +57 -28
- data/spec/fixtures/files/umn_solr_thumb.json +59 -31
- data/spec/services/image_service_spec.rb +10 -0
- data/template.rb +4 -4
- metadata +9 -40
- data/app/assets/stylesheets/geoblacklight_sidecar_images/application.scss +0 -10
- data/lib/generators/geoblacklight_sidecar_images/templates/gblsci.scss +0 -3
- data/spec/fixtures/files/actual-papermap1.json +0 -23
- data/spec/fixtures/files/actual-point1.json +0 -37
- data/spec/fixtures/files/actual-raster1.json +0 -38
- data/spec/fixtures/files/b1g_thumbnail.json +0 -42
- data/spec/fixtures/files/baruch_ancestor1.json +0 -46
- data/spec/fixtures/files/baruch_ancestor2.json +0 -46
- data/spec/fixtures/files/baruch_documentation_download.json +0 -49
- data/spec/fixtures/files/bbox-spans-180.json +0 -20
- data/spec/fixtures/files/cornell_html_metadata.json +0 -42
- data/spec/fixtures/files/esri-dynamic-layer-single-layer.json +0 -40
- data/spec/fixtures/files/esri-feature-layer.json +0 -46
- data/spec/fixtures/files/esri-wms-layer.json +0 -33
- data/spec/fixtures/files/harvard_raster.json +0 -44
- data/spec/fixtures/files/iiif-eastern-hemisphere.json +0 -30
- data/spec/fixtures/files/index-map-polygon-no-downloadurl.json +0 -37
- data/spec/fixtures/files/index-map-polygon.json +0 -37
- data/spec/fixtures/files/index-map-stanford.json +0 -37
- data/spec/fixtures/files/index_map_point.json +0 -27
- data/spec/fixtures/files/no_spatial.json +0 -21
- data/spec/fixtures/files/princeton-child1.json +0 -30
- data/spec/fixtures/files/princeton-child2.json +0 -30
- data/spec/fixtures/files/princeton-child3.json +0 -30
- data/spec/fixtures/files/princeton-child4.json +0 -30
- data/spec/fixtures/files/princeton-parent.json +0 -25
- data/spec/fixtures/files/public_direct_download.json +0 -34
- data/spec/fixtures/files/public_polygon_mit.json +0 -27
- data/spec/fixtures/files/restricted-line.json +0 -37
- data/spec/fixtures/files/umn_metro_result1.json +0 -41
- data/spec/fixtures/files/umn_metro_result2.json +0 -35
- data/spec/fixtures/files/umn_state_result1.json +0 -38
- data/spec/fixtures/files/umn_state_result2.json +0 -38
- data/spec/fixtures/files/uva_slug_colon.json +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96f06c7af296c459455b5fe957e3beb1cb645d6858d4616fd36be7588be9a6e4
|
4
|
+
data.tar.gz: c072e128bfdf21f0a2403a2ea828f2f7e810b989cf36aba7387d8e32d5c00a27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e22a7a9de645a3746d4136b874ce312a62a0f0f7bbe5207d5952352d5abee212a041b588d0f8898b745998b1858c95fe58e7968f7f040fa639dce80e0e1cbb1
|
7
|
+
data.tar.gz: '097fe4199abadd75813720959580afd61e7753361f0e37c76ea9ec308c7a296ceb915e610f057b094252319950afd33bfe001d2017be430b150ededa74c55cae'
|
data/.github/workflows/ruby.yml
CHANGED
@@ -13,13 +13,13 @@ jobs:
|
|
13
13
|
strategy:
|
14
14
|
matrix:
|
15
15
|
bundler_version: [2.1.1]
|
16
|
-
faraday_version: ['~>
|
16
|
+
faraday_version: ['~> 2.0']
|
17
17
|
steps:
|
18
18
|
- uses: actions/checkout@v2
|
19
19
|
- name: Set up Ruby
|
20
20
|
uses: ruby/setup-ruby@v1
|
21
21
|
with:
|
22
|
-
ruby-version: 2
|
22
|
+
ruby-version: 3.2
|
23
23
|
- name: Install bundler
|
24
24
|
run: gem install bundler -v ${{ matrix.bundler_version }}
|
25
25
|
- name: Install dependencies
|
@@ -33,10 +33,10 @@ jobs:
|
|
33
33
|
runs-on: ubuntu-latest
|
34
34
|
strategy:
|
35
35
|
matrix:
|
36
|
-
ruby_version: ["3.
|
36
|
+
ruby_version: ["3.2"]
|
37
37
|
rails_version: [7.0.4.2, 6.1.7.2]
|
38
38
|
bundler_version: [2.1.1]
|
39
|
-
faraday_version: ['~>
|
39
|
+
faraday_version: ['~> 2.0']
|
40
40
|
|
41
41
|
name: test ruby ${{ matrix.ruby_version }} / rails ${{ matrix.rails_version }} / faraday ${{ matrix.faraday_version }}
|
42
42
|
steps:
|
data/.solr_wrapper.yml
CHANGED
data/README.md
CHANGED
@@ -19,8 +19,8 @@ This GeoBlacklight plugin captures remote images from geographic web services an
|
|
19
19
|
|
20
20
|
## Requirements
|
21
21
|
|
22
|
-
* [Ruby on Rails >=
|
23
|
-
* [GeoBlacklight
|
22
|
+
* [Ruby on Rails >= 6.1.7](https://weblog.rubyonrails.org/releases/)
|
23
|
+
* [GeoBlacklight v4 or v3](https://github.com/geoblacklight/geoblacklight)
|
24
24
|
* [ImageMagick](https://github.com/ImageMagick/ImageMagick)
|
25
25
|
|
26
26
|
### Suggested
|
@@ -33,10 +33,15 @@ This GeoBlacklight plugin captures remote images from geographic web services an
|
|
33
33
|
|
34
34
|
### Existing GeoBlacklight Instance
|
35
35
|
|
36
|
-
Add the gem to your Gemfile.
|
36
|
+
GeoBlacklight v4 with Aardvark metadata / Add the gem to your Gemfile.
|
37
37
|
|
38
38
|
```ruby
|
39
|
-
gem
|
39
|
+
gem "geoblacklight_sidecar_images", "~> 1.0"
|
40
|
+
```
|
41
|
+
|
42
|
+
GeoBlacklight v3 with GBL v1.0 metadata / Add the gem to your Gemfile.
|
43
|
+
```ruby
|
44
|
+
gem "geoblacklight_sidecar_images", "~> 0.9.1", "< 1.0"
|
40
45
|
```
|
41
46
|
|
42
47
|
Run the generator.
|
@@ -73,7 +78,7 @@ config.active_storage.service = :local
|
|
73
78
|
Create a new GeoBlacklight instance with the GBLSI code
|
74
79
|
|
75
80
|
```bash
|
76
|
-
$ rails new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight_sidecar_images/
|
81
|
+
$ rails new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight_sidecar_images/develop/template.rb
|
77
82
|
|
78
83
|
```
|
79
84
|
|
@@ -268,14 +273,3 @@ tail -f log/image_service_development.log
|
|
268
273
|
|
269
274
|
[See Localhost Results](http://localhost:3000/?per_page=50&q=&search_field=all_fields)
|
270
275
|
|
271
|
-
## TODOs
|
272
|
-
|
273
|
-
* ~~0.0.1 - Initial gem~~
|
274
|
-
* ~~0.1.0 - Prioritize local thumbnail solr field~~
|
275
|
-
* ~~0.2.0 - Forgo attaching placeholder imagery~~
|
276
|
-
* ~~0.3.0 - Add Statesman (state machine library)~~
|
277
|
-
* ~~0.4.0 - Rails 5.2 branch / Switch to ActionStorage~~
|
278
|
-
* ~~0.7.0 - Rails 5.2+ and 6+ / GeoBlacklight 2+ and 3+ support~~
|
279
|
-
* ~~0.8.0 - GeoBlacklight Aardvark support~~
|
280
|
-
* 0.7.0 to 0.9.0 - Feedback; Improve test coverage; Collect additional real-world issues
|
281
|
-
* 1.0.0 - Final release
|
@@ -1,11 +1,35 @@
|
|
1
1
|
// GBLSCI results
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
max-width: 100px;
|
6
|
-
text-align: center;
|
2
|
+
#documents {
|
3
|
+
.index_title {
|
4
|
+
font-size: 1rem;
|
7
5
|
}
|
8
|
-
|
9
|
-
|
6
|
+
|
7
|
+
.status-icons {
|
8
|
+
display: inline-block;
|
9
|
+
|
10
|
+
span {
|
11
|
+
min-width: 0px;
|
12
|
+
}
|
10
13
|
}
|
11
|
-
|
14
|
+
|
15
|
+
.thumbnail {
|
16
|
+
height: 100px;
|
17
|
+
width: 100px;
|
18
|
+
margin-left:auto;
|
19
|
+
margin-right: auto;
|
20
|
+
img {
|
21
|
+
max-height: 160px;
|
22
|
+
width: inherit;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
.icon .blacklight-icons {
|
27
|
+
height: 4.5rem;
|
28
|
+
width: 4.5rem;
|
29
|
+
|
30
|
+
svg {
|
31
|
+
height:95%;
|
32
|
+
width:95%;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
@@ -128,7 +128,7 @@ module GeoblacklightSidecarImages
|
|
128
128
|
return nil unless uri.scheme.include?("http")
|
129
129
|
|
130
130
|
conn = Faraday.new(url: uri.normalize.to_s) do |b|
|
131
|
-
b.use FaradayMiddleware::FollowRedirects
|
131
|
+
b.use Geoblacklight::FaradayMiddleware::FollowRedirects
|
132
132
|
b.adapter :net_http
|
133
133
|
end
|
134
134
|
|
@@ -17,8 +17,8 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
s.require_paths = ["lib"]
|
19
19
|
|
20
|
-
s.add_dependency "faraday", ">=
|
21
|
-
s.add_dependency "geoblacklight", "~>
|
20
|
+
s.add_dependency "faraday", ">= 2.0"
|
21
|
+
s.add_dependency "geoblacklight", "~> 4.0"
|
22
22
|
s.add_dependency "image_processing", "~> 1.6"
|
23
23
|
s.add_dependency "mimemagic", "~> 0.3"
|
24
24
|
s.add_dependency "mini_magick", "~> 4.9.4"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails/generators"
|
4
|
+
|
5
|
+
module GeoblacklightSidecarImages
|
6
|
+
class HelpersGenerator < Rails::Generators::Base
|
7
|
+
source_root File.expand_path("templates", __dir__)
|
8
|
+
|
9
|
+
desc <<-DESCRIPTION
|
10
|
+
This generator makes the following changes to your application:
|
11
|
+
1. Creates an app/helpers/blacklight directory
|
12
|
+
DESCRIPTION
|
13
|
+
|
14
|
+
def create_views
|
15
|
+
copy_file(
|
16
|
+
"helpers/blacklight/layout_helper_behavior.rb",
|
17
|
+
"app/helpers/blacklight/layout_helper_behavior.rb"
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -17,7 +17,9 @@ GBLSI_THUMBNAIL_FIELD: 'thumbnail_path_ss'"
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def generate_gblsci_assets
|
20
|
-
|
20
|
+
inject_into_file "app/assets/stylesheets/application.scss", after: "@import 'geoblacklight';\n" do
|
21
|
+
"@import 'geoblacklight_sidecar_images/gblsci';"
|
22
|
+
end
|
21
23
|
end
|
22
24
|
|
23
25
|
def generate_gblsci_example_docs
|
@@ -36,6 +38,10 @@ GBLSI_THUMBNAIL_FIELD: 'thumbnail_path_ss'"
|
|
36
38
|
generate "geoblacklight_sidecar_images:views"
|
37
39
|
end
|
38
40
|
|
41
|
+
def generate_gblsci_helpers
|
42
|
+
generate "geoblacklight_sidecar_images:helpers"
|
43
|
+
end
|
44
|
+
|
39
45
|
def generate_action_storage
|
40
46
|
rake "active_storage:install"
|
41
47
|
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Methods added to this helper will be available to all templates in the hosting
|
4
|
+
# application
|
5
|
+
module Blacklight
|
6
|
+
# A module for useful methods used in layout configuration
|
7
|
+
module LayoutHelperBehavior
|
8
|
+
##
|
9
|
+
# Classes added to a document's show content div
|
10
|
+
# @return [String]
|
11
|
+
def show_content_classes
|
12
|
+
"#{main_content_classes} show-document"
|
13
|
+
end
|
14
|
+
|
15
|
+
##
|
16
|
+
# Attributes to add to the <html> tag (e.g. lang and dir)
|
17
|
+
# @return [Hash]
|
18
|
+
def html_tag_attributes
|
19
|
+
{lang: I18n.locale}
|
20
|
+
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# Classes added to a document's sidebar div
|
24
|
+
# @return [String]
|
25
|
+
def show_sidebar_classes
|
26
|
+
sidebar_classes
|
27
|
+
end
|
28
|
+
|
29
|
+
##
|
30
|
+
# Classes used for sizing the main content of a Blacklight page
|
31
|
+
# @return [String]
|
32
|
+
def main_content_classes
|
33
|
+
"col-lg-9"
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# Classes used for sizing the sidebar content of a Blacklight page
|
38
|
+
# @return [String]
|
39
|
+
def sidebar_classes
|
40
|
+
"page-sidebar col-lg-3"
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Class used for specifying main layout container classes. Can be
|
45
|
+
# overwritten to return 'container-fluid' for Bootstrap full-width layout
|
46
|
+
# @return [String]
|
47
|
+
def container_classes
|
48
|
+
"container-fluid"
|
49
|
+
end
|
50
|
+
|
51
|
+
##
|
52
|
+
# Render "document actions" area for navigation header
|
53
|
+
# (normally renders "Saved Searches", "History", "Bookmarks")
|
54
|
+
# These things are added by add_nav_action
|
55
|
+
#
|
56
|
+
# @param [Hash] options
|
57
|
+
# @return [String]
|
58
|
+
def render_nav_actions(options = {}, &block)
|
59
|
+
render_filtered_partials(blacklight_config.navbar.partials, options, &block)
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# Open Search discovery tag for HTML <head> links
|
64
|
+
# @return [String]
|
65
|
+
def opensearch_description_tag title, href
|
66
|
+
tag :link, href: href, title: title, type: "application/opensearchdescription+xml", rel: "search"
|
67
|
+
end
|
68
|
+
|
69
|
+
##
|
70
|
+
# Get the page's HTML title
|
71
|
+
#
|
72
|
+
# @return [String]
|
73
|
+
def render_page_title
|
74
|
+
(content_for(:page_title) if content_for?(:page_title)) || @page_title || application_name
|
75
|
+
end
|
76
|
+
|
77
|
+
##
|
78
|
+
# Create <link rel="alternate"> links from a documents dynamically
|
79
|
+
# provided export formats.
|
80
|
+
#
|
81
|
+
# Returns empty string if no links available.
|
82
|
+
#
|
83
|
+
# @param [SolrDocument] document
|
84
|
+
# @param [Hash] options
|
85
|
+
# @option options [Boolean] :unique ensures only one link is output for every
|
86
|
+
# content type, e.g. as required by atom
|
87
|
+
# @option options [Array<String>] :exclude array of format shortnames to not include in the output
|
88
|
+
# @return [String]
|
89
|
+
def render_link_rel_alternates(document = @document, options = {})
|
90
|
+
return if document.nil?
|
91
|
+
|
92
|
+
document_presenter(document).link_rel_alternates(options)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Render classes for the <body> element
|
97
|
+
# @return [String]
|
98
|
+
def render_body_class
|
99
|
+
extra_body_classes.join " "
|
100
|
+
end
|
101
|
+
|
102
|
+
##
|
103
|
+
# List of classes to be applied to the <body> element
|
104
|
+
# @see render_body_class
|
105
|
+
# @return [Array<String>]
|
106
|
+
def extra_body_classes
|
107
|
+
@extra_body_classes ||= ["blacklight-#{controller.controller_name}", "blacklight-#{[controller.controller_name, controller.action_name].join("-")}"]
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -1,31 +1,32 @@
|
|
1
1
|
<% # header bar for doc items in index view -%>
|
2
|
-
<%= content_tag :div, class: 'documentHeader row', data: { layer_id: document.id, geom: document.geometry.geojson } do %>
|
3
|
-
<div class='
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
</h3>
|
13
|
-
|
14
|
-
<div class='col-md-12 more-info-area'>
|
15
|
-
<div class='media'>
|
16
|
-
<% if document.sidecar.image.attached? %>
|
17
|
-
<% if document.sidecar.image.variable? %>
|
18
|
-
<%= image_tag document.sidecar.image.variant(resize: "200"), {class: 'mr-3'} %>
|
2
|
+
<%= content_tag :div, class: 'documentHeader row mb-4', data: { layer_id: document.id, geom: document.geometry.geojson } do %>
|
3
|
+
<div class='col-md-12'>
|
4
|
+
<div class='row'>
|
5
|
+
<div class='col-2 thumbnail'>
|
6
|
+
<% if document.sidecar.image.attached? %>
|
7
|
+
<% if document.sidecar.image.variable? %>
|
8
|
+
<%= image_tag document.sidecar.image.variant(resize: "200") %>
|
9
|
+
<% else %>
|
10
|
+
<%= image_tag document.sidecar.image %>
|
11
|
+
<% end %>
|
19
12
|
<% else %>
|
20
|
-
|
13
|
+
<span class="icon square" title="<%=document[Settings.FIELDS.RESOURCE_CLASS]%>">
|
14
|
+
<%= geoblacklight_icon(document[Settings.FIELDS.RESOURCE_CLASS].first) %>
|
15
|
+
</span>
|
21
16
|
<% end %>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
17
|
+
</div>
|
18
|
+
<div class='col-9'>
|
19
|
+
<h3 class="index_title text-span">
|
20
|
+
<% counter = document_counter_with_offset(document_counter) %>
|
21
|
+
<span class="document-counter">
|
22
|
+
<%= t('blacklight.search.documents.counter', :counter => counter) if counter %>
|
23
|
+
</span>
|
24
|
+
<%= link_to_document document, counter: counter, itemprop: "name" %>
|
25
|
+
</h3>
|
28
26
|
<small>
|
27
|
+
<div class='status-icons'>
|
28
|
+
<%= render partial: 'header_icons', locals: { document: document } %>
|
29
|
+
</div>
|
29
30
|
<%= geoblacklight_present(:index_fields_display, document) %>
|
30
31
|
</small>
|
31
32
|
</div>
|
@@ -36,7 +36,7 @@ namespace :gblsci do
|
|
36
36
|
results.docs.each do |document|
|
37
37
|
sleep(1)
|
38
38
|
begin
|
39
|
-
GeoblacklightSidecarImages::StoreImageJob.perform_later(document["
|
39
|
+
GeoblacklightSidecarImages::StoreImageJob.perform_later(document["id"])
|
40
40
|
rescue Blacklight::Exceptions::RecordNotFound
|
41
41
|
next
|
42
42
|
end
|
data/solr/conf/schema.xml
CHANGED
@@ -1,24 +1,39 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<schema name="geoblacklight-schema" version="
|
3
|
-
<uniqueKey>
|
2
|
+
<schema name="geoblacklight-schema" version="4.0">
|
3
|
+
<uniqueKey>id</uniqueKey>
|
4
4
|
<fields>
|
5
5
|
<field name="_version_" type="long" stored="true" indexed="true"/>
|
6
6
|
<field name="timestamp" type="date" stored="true" indexed="true" default="NOW"/>
|
7
|
-
<field name="
|
8
|
-
<field name="geoblacklight_version" type="string" stored="true" indexed="true"/>
|
9
|
-
<field name="uuid" type="string" stored="true" indexed="true"/><!-- deprecated -->
|
7
|
+
<field name="id" type="string" stored="true" indexed="true" required="true"/>
|
10
8
|
|
11
9
|
<!-- core generated fields -->
|
12
10
|
<field name="text" type="text_en" stored="false" indexed="true" multiValued="true"
|
13
11
|
termVectors="true" termPositions="true" termOffsets="true" />
|
14
12
|
|
13
|
+
<!-- Spatial Field Type: Represents the exent of the resource and powers map search functionality.
|
14
|
+
Value can be any valid WKT or ENVELOPE String:
|
15
|
+
<field name="locn_geometry">POLYGON((1 8, 1 9, 2 9, 2 8, 1 8))</field>
|
16
|
+
<field name="locn_geometry">ENVELOPE(-117.312, -115.39, 84.31, 83.1)</field> -->
|
17
|
+
<field name="locn_geometry" type="location_geo3d" stored="true" indexed="true"/>
|
18
|
+
|
19
|
+
<!-- Spatial Field Type: The bounding box of the resource. Used in overlap ratio boosting.
|
20
|
+
Value must be an ENVELOPE String:
|
21
|
+
<field name="dcat_bbox">ENVELOPE(-117.312, -115.39, 84.31, 83.1)</field> -->
|
22
|
+
<field name="dcat_bbox" type="location_rpt" stored="true" indexed="true"/>
|
23
|
+
|
24
|
+
<!-- Spatial Field Type: Used to display the center point of a resource. -->
|
25
|
+
<field name="dcat_centroid" type="location" stored="true" indexed="true"/>
|
26
|
+
|
27
|
+
<!-- Spatial Field Type: Internal field used for overlap ratio boosting. -->
|
28
|
+
<field name="solr_bboxtype" type="bbox" stored="true" indexed="true"/>
|
29
|
+
|
15
30
|
<!-- dynamic field with simple types by suffix -->
|
16
31
|
<dynamicField name="*_b" type="boolean" stored="true" indexed="true"/>
|
17
32
|
<dynamicField name="*_d" type="double" stored="true" indexed="true"/>
|
18
33
|
<dynamicField name="*_dt" type="date" stored="true" indexed="true"/>
|
19
34
|
<dynamicField name="*_f" type="float" stored="true" indexed="true"/>
|
20
35
|
<dynamicField name="*_i" type="int" stored="true" indexed="true"/>
|
21
|
-
<dynamicField name="*_im" type="int" stored="true" indexed="true" multiValued="true" />
|
36
|
+
<dynamicField name="*_im" type="int" stored="true" indexed="true" multiValued="true" sortMissingLast="true" />
|
22
37
|
<dynamicField name="*_l" type="long" stored="true" indexed="true"/>
|
23
38
|
<dynamicField name="*_s" type="string" stored="true" indexed="true"/>
|
24
39
|
<dynamicField name="*_ss" type="string" stored="true" indexed="false"/>
|
@@ -43,29 +58,8 @@
|
|
43
58
|
|
44
59
|
<dynamicField name="*suggest" type="textSuggest" indexed="true" stored="false" multiValued="true" />
|
45
60
|
|
46
|
-
<!--
|
47
|
-
|
48
|
-
Solr3:
|
49
|
-
<field name="my_pt">83.1,-117.312</field>
|
50
|
-
as (y,x)
|
51
|
-
|
52
|
-
Solr4:
|
53
|
-
|
54
|
-
<field name="my_bbox">-117.312 83.1 -115.39 84.31</field>
|
55
|
-
as (W S E N)
|
56
|
-
|
57
|
-
<field name="my_geom">ENVELOPE(-117.312, -115.39, 84.31, 83.1)</field>
|
58
|
-
as (W E N S)
|
59
|
-
|
60
|
-
<field name="my_jts">POLYGON((1 8, 1 9, 2 9, 2 8, 1 8))</field>
|
61
|
-
as WKT for point, linestring, polygon
|
62
|
-
|
63
|
-
-->
|
64
|
-
<dynamicField name="*_pt" type="location" stored="true" indexed="true"/>
|
65
|
-
<dynamicField name="*_bbox" type="location_rpt" stored="true" indexed="true"/><!-- deprecated -->
|
66
|
-
<dynamicField name="*_geom" type="location_rpt" stored="true" indexed="true"/>
|
67
|
-
<dynamicField name="*_bboxtype" type="bbox" stored="true" indexed="true"/>
|
68
|
-
|
61
|
+
<!-- date range (_drsim) -->
|
62
|
+
<dynamicField name="*_drsim" type="dateRange" stored="true" indexed="true" multiValued="true"/>
|
69
63
|
</fields>
|
70
64
|
|
71
65
|
<types>
|
@@ -82,6 +76,9 @@
|
|
82
76
|
A Trie based date field for faster date range queries and date faceting. -->
|
83
77
|
<fieldType name="date" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
|
84
78
|
|
79
|
+
<!-- A DateRange based date field for truly faster date range queries. -->
|
80
|
+
<fieldType name="dateRange" class="solr.DateRangeField"/>
|
81
|
+
|
85
82
|
<!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
|
86
83
|
<fieldtype name="binary" class="solr.BinaryField"/>
|
87
84
|
|
@@ -140,10 +137,17 @@
|
|
140
137
|
</fieldType>
|
141
138
|
|
142
139
|
<!-- Spatial field types -->
|
143
|
-
<fieldType name="location" class="solr.
|
144
|
-
|
140
|
+
<fieldType name="location" class="solr.LatLonPointSpatialField" docValues="true"/>
|
145
141
|
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
|
146
|
-
geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers"
|
142
|
+
geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers"/>
|
143
|
+
<fieldType name="location_geo3d"
|
144
|
+
class="solr.SpatialRecursivePrefixTreeFieldType"
|
145
|
+
spatialContextFactory="Geo3D"
|
146
|
+
prefixTree="s2"
|
147
|
+
geo="true"
|
148
|
+
maxDistErr="0.001"
|
149
|
+
planetModel="WGS84"/>
|
150
|
+
|
147
151
|
<!-- Adding field type for bboxField that enables, among other things, overlap ratio calculations -->
|
148
152
|
<fieldType name="bbox" class="solr.BBoxField"
|
149
153
|
geo="true" distanceUnits="kilometers" numberType="pdouble" />
|
@@ -153,44 +157,42 @@
|
|
153
157
|
<!-- for scoring formula -->
|
154
158
|
<copyField source="dct_spatial_sm" dest="dct_spatial_tmi" maxChars="10000"/>
|
155
159
|
<copyField source="dct_temporal_sm" dest="dct_temporal_tmi" maxChars="10000"/>
|
156
|
-
<copyField source="
|
157
|
-
<copyField source="
|
158
|
-
<copyField source="
|
159
|
-
<copyField source="
|
160
|
-
<copyField source="
|
161
|
-
<copyField source="
|
162
|
-
<copyField source="
|
163
|
-
<copyField source="
|
164
|
-
<copyField source="
|
160
|
+
<copyField source="dct_creator_sm" dest="dct_creator_tmi" maxChars="1000"/>
|
161
|
+
<copyField source="dct_description_sm" dest="dct_description_tmi" maxChars="10000"/>
|
162
|
+
<copyField source="dct_format_s" dest="dct_format_ti" maxChars="100"/>
|
163
|
+
<copyField source="dct_identifier_sm" dest="dct_identifier_tmi" maxChars="100"/>
|
164
|
+
<copyField source="dct_publisher_sm" dest="dct_publisher_tmi" maxChars="1000"/>
|
165
|
+
<copyField source="dct_accessRights_s" dest="dct_accessRights_ti" maxChars="100"/>
|
166
|
+
<copyField source="schema_provider_s" dest="dct_provider_ti" maxChars="1000"/>
|
167
|
+
<copyField source="dct_subject_sm" dest="dct_subject_tmi" maxChars="10000"/>
|
168
|
+
<copyField source="dct_title_s" dest="dct_title_ti" maxChars="1000"/>
|
165
169
|
<copyField source="dct_isPartOf_sm" dest="dct_isPartOf_tmi" maxChars="1000"/>
|
166
|
-
<copyField source="
|
167
|
-
<copyField source="layer_slug_s" dest="layer_slug_ti" maxChars="100"/>
|
170
|
+
<copyField source="id" dest="layer_slug_ti" maxChars="100"/>
|
168
171
|
|
169
172
|
<!-- core text search -->
|
170
173
|
<copyField source="*_s" dest="text" />
|
171
174
|
<copyField source="*_sm" dest="text" />
|
172
175
|
|
173
176
|
<!-- for sorting text fields -->
|
174
|
-
<copyField source="
|
175
|
-
<copyField source="
|
176
|
-
<copyField source="dc_title_s" dest="dc_title_sort"/>
|
177
|
+
<copyField source="schema_provider_s" dest="schema_provider_sort"/>
|
178
|
+
<copyField source="dct_title_s" dest="dct_title_sort"/>
|
177
179
|
|
178
180
|
<!-- for spell checking -->
|
179
|
-
<copyField source="
|
180
|
-
<copyField source="
|
181
|
-
<copyField source="
|
182
|
-
<copyField source="
|
183
|
-
<copyField source="
|
181
|
+
<copyField source="dct_title_s" dest="spell"/>
|
182
|
+
<copyField source="dct_creator_sm" dest="spell"/>
|
183
|
+
<copyField source="dct_publisher_sm" dest="spell"/>
|
184
|
+
<copyField source="schema_provider_s" dest="spell"/>
|
185
|
+
<copyField source="dct_subject_sm" dest="spell"/>
|
184
186
|
<copyField source="dct_spatial_sm" dest="spell"/>
|
185
187
|
|
186
188
|
<!-- for suggestions -->
|
187
|
-
<copyField source="
|
188
|
-
<copyField source="
|
189
|
-
<copyField source="
|
190
|
-
<copyField source="
|
191
|
-
<copyField source="
|
189
|
+
<copyField source="dct_title_s" dest="suggest"/>
|
190
|
+
<copyField source="dct_creator_sm" dest="suggest"/>
|
191
|
+
<copyField source="dct_publisher_sm" dest="suggest"/>
|
192
|
+
<copyField source="schema_provider_s" dest="suggest"/>
|
193
|
+
<copyField source="dct_subject_sm" dest="suggest"/>
|
192
194
|
<copyField source="dct_spatial_sm" dest="suggest"/>
|
193
195
|
|
194
196
|
<!-- for bbox value -->
|
195
|
-
<copyField source="
|
196
|
-
</schema>
|
197
|
+
<copyField source="dcat_bbox" dest="solr_bboxtype"/>
|
198
|
+
</schema>
|