geoblacklight 3.3.1 → 4.0.0.pre.alpha.2
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 +30 -24
- data/.rubocop.yml +5 -0
- data/.rubocop_todo.yml +11 -6
- data/README.md +1 -1
- data/Rakefile +7 -8
- data/app/assets/images/blacklight/michigan-state-university.svg +5 -0
- data/app/assets/images/blacklight/pennsylvania-state-university.svg +5 -0
- data/app/assets/images/blacklight/purdue-university.svg +5 -0
- data/app/assets/images/blacklight/the-ohio-state-university.svg +6 -0
- data/app/assets/images/blacklight/university-of-chicago.svg +5 -0
- data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +5 -0
- data/app/assets/images/blacklight/university-of-iowa.svg +4 -0
- data/app/assets/images/blacklight/university-of-maryland.svg +4 -0
- data/app/assets/images/blacklight/university-of-michigan.svg +4 -0
- data/app/assets/images/blacklight/university-of-minnesota.svg +4 -0
- data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +7 -0
- data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +4 -0
- data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +41 -0
- data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +6 -0
- data/app/components/geoblacklight/homepage_feature_facet_component.html.erb +11 -0
- data/app/components/geoblacklight/homepage_feature_facet_component.rb +13 -0
- data/{lib → app/helpers}/geoblacklight/geoblacklight_helper_behavior.rb +6 -4
- data/app/helpers/geoblacklight_helper.rb +0 -21
- data/app/models/concerns/geoblacklight/solr_document/citation.rb +2 -2
- data/app/models/concerns/geoblacklight/solr_document.rb +4 -4
- data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
- data/app/views/catalog/_arcgis.html.erb +1 -1
- data/app/views/catalog/_data_dictionary.html.erb +1 -2
- data/app/views/catalog/_downloads_primary.html.erb +1 -1
- data/app/views/catalog/_header_icons.html.erb +1 -1
- data/app/views/catalog/_home_text.html.erb +7 -29
- data/app/views/catalog/_show_header_default.html.erb +1 -1
- data/app/views/relation/_relations.html.erb +15 -0
- data/app/views/relation/index.html.erb +5 -17
- data/app/views/relation/index.json.jbuilder +6 -2
- data/config/initializers/new_gbl_settings_defaults_3_4.yml +6 -0
- data/config/initializers/rails_config.rb +0 -4
- data/config/locales/geoblacklight.en.yml +8 -0
- data/geoblacklight.gemspec +1 -1
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +82 -35
- data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +195 -0
- data/lib/generators/geoblacklight/templates/settings.yml +87 -22
- data/lib/geoblacklight/download/geojson_download.rb +1 -1
- data/lib/geoblacklight/download/geotiff_download.rb +1 -1
- data/lib/geoblacklight/download/hgl_download.rb +1 -1
- data/lib/geoblacklight/download/kmz_download.rb +1 -1
- data/lib/geoblacklight/download/shapefile_download.rb +1 -1
- data/lib/geoblacklight/engine.rb +0 -2
- data/lib/geoblacklight/references.rb +1 -1
- data/lib/geoblacklight/relation/ancestors.rb +4 -3
- data/lib/geoblacklight/relation/descendants.rb +4 -3
- data/lib/geoblacklight/relation/relation_response.rb +21 -6
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight/view_helper_override.rb +1 -1
- data/lib/geoblacklight.rb +0 -1
- data/schema/{geoblacklight-schema.json → geoblacklight-schema-1.0.json} +1 -1
- data/schema/geoblacklight-schema-aardvark.json +211 -0
- data/solr/conf/schema.xml +38 -30
- data/solr/conf/solrconfig.xml +15 -15
- data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +39 -0
- data/spec/config/initializers/rails_config_spec.rb +9 -8
- data/spec/controllers/catalog_controller_spec.rb +6 -6
- data/spec/features/download_layer_spec.rb +1 -1
- data/spec/features/esri_viewer_spec.rb +1 -1
- data/spec/features/home_page_spec.rb +4 -4
- data/spec/features/layer_opacity_spec.rb +1 -0
- data/spec/features/metadata_panel_spec.rb +1 -1
- data/spec/features/missing_metadata_spec.rb +2 -2
- data/spec/features/relations_spec.rb +2 -2
- data/spec/features/search_results_map_spec.rb +2 -1
- data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
- data/spec/features/search_spec.rb +5 -0
- data/spec/features/split_view.html.erb_spec.rb +15 -11
- data/spec/fixtures/solr_documents/README.md +48 -36
- data/spec/fixtures/solr_documents/actual-papermap1.json +41 -18
- data/spec/fixtures/solr_documents/actual-point1.json +47 -27
- data/spec/fixtures/solr_documents/actual-polygon1.json +43 -18
- data/spec/fixtures/solr_documents/actual-raster1.json +52 -23
- data/spec/fixtures/solr_documents/all-relationships.json +48 -0
- data/spec/fixtures/solr_documents/baruch_ancestor1.json +62 -37
- data/spec/fixtures/solr_documents/baruch_ancestor2.json +62 -37
- data/spec/fixtures/solr_documents/baruch_documentation_download.json +60 -34
- data/spec/fixtures/solr_documents/bbox-spans-180.json +34 -16
- data/spec/fixtures/solr_documents/cornell_html_metadata.json +46 -26
- data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +43 -25
- data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +45 -28
- data/spec/fixtures/solr_documents/esri-feature-layer.json +44 -34
- data/spec/fixtures/solr_documents/esri-image-map-layer.json +45 -31
- data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +42 -17
- data/spec/fixtures/solr_documents/esri-wms-layer.json +46 -21
- data/spec/fixtures/solr_documents/harvard_raster.json +55 -36
- data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +35 -22
- data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +48 -27
- data/spec/fixtures/solr_documents/index-map-polygon.json +48 -27
- data/spec/fixtures/solr_documents/index-map-stanford.json +54 -25
- data/spec/fixtures/solr_documents/index_map_point.json +54 -26
- data/spec/fixtures/solr_documents/metadata_no_geom.json +27 -0
- data/spec/fixtures/solr_documents/metadata_no_provider.json +39 -0
- data/spec/fixtures/solr_documents/multiple-downloads.json +33 -20
- data/spec/fixtures/solr_documents/no_locn_geometry.json +25 -0
- data/spec/fixtures/solr_documents/no_spatial.json +37 -19
- data/spec/fixtures/solr_documents/oembed.json +34 -17
- data/spec/fixtures/solr_documents/princeton-child1.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child2.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child3.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child4.json +45 -28
- data/spec/fixtures/solr_documents/princeton-parent.json +46 -23
- data/spec/fixtures/solr_documents/public_direct_download.json +48 -21
- data/spec/fixtures/solr_documents/public_iiif_princeton.json +49 -24
- data/spec/fixtures/solr_documents/public_polygon_mit.json +31 -15
- data/spec/fixtures/solr_documents/restricted-line.json +52 -21
- data/spec/fixtures/solr_documents/the-related-record.json +27 -0
- data/spec/fixtures/solr_documents/tms.json +33 -17
- data/spec/fixtures/solr_documents/umn_metro_result1.json +44 -28
- data/spec/fixtures/solr_documents/umn_state_result1.json +44 -26
- data/spec/fixtures/solr_documents/umn_state_result2.json +45 -24
- data/spec/fixtures/solr_documents/uva_slug_colon.json +43 -20
- data/spec/{lib → helpers}/geoblacklight/geoblacklight_helper_behavior_spec.rb +1 -0
- data/spec/helpers/geoblacklight_helper_spec.rb +0 -19
- data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download_spec.rb +1 -1
- data/spec/lib/geoblacklight/references_spec.rb +2 -2
- data/spec/lib/geoblacklight/relation/ancestors_spec.rb +3 -3
- data/spec/lib/geoblacklight/relation/descendants_spec.rb +3 -3
- data/spec/lib/geoblacklight/relation/relation_response_spec.rb +32 -17
- data/spec/models/concerns/geoblacklight/solr_document_spec.rb +4 -4
- data/spec/spec_helper.rb +2 -0
- data/spec/support/view_component_capybara_test_helpers.rb +8 -0
- metadata +44 -32
- data/app/views/catalog/_document_action.html.erb +0 -6
- data/app/views/catalog/_facet_tag_item.html.erb +0 -3
- data/app/views/catalog/_facet_tag_layout.html.erb +0 -2
- data/app/views/relation/_ancestors.html.erb +0 -8
- data/app/views/relation/_descendants.html.erb +0 -15
- data/config/initializers/new_gbl_settings_defaults_3_3.yml +0 -10
- data/schema/format-values.md +0 -50
- data/schema/geoblacklight-schema-deprecated.md +0 -39
- data/schema/geoblacklight-schema.md +0 -323
- data/schema/geometry-type-values.md +0 -11
- data/schema/references.md +0 -23
- data/schema/schema-commentary.md +0 -198
- data/schema/subjects.md +0 -41
- data/schema/type-values.md +0 -10
- data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +0 -30
- data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +0 -17
- data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +0 -23
@@ -0,0 +1,211 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/schema#",
|
3
|
+
"description": "Schema for GeoBlacklight. See https://opengeometadata.github.io/aardvark/aardvarkMetadata.html for more details.",
|
4
|
+
"id": "http://geoblacklight.org/schema/aardvark",
|
5
|
+
"title": "GeoBlacklight Schema - Aardvark",
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"dct_title_s": { "type": "string" },
|
9
|
+
"dct_alternative_sm": {
|
10
|
+
"type": "array",
|
11
|
+
"items": {
|
12
|
+
"type": "string"
|
13
|
+
}
|
14
|
+
},
|
15
|
+
"dct_description_sm": {
|
16
|
+
"type": "array",
|
17
|
+
"items": {
|
18
|
+
"type": "string"
|
19
|
+
}
|
20
|
+
},
|
21
|
+
"dct_language_sm": {
|
22
|
+
"type": "array",
|
23
|
+
"items": {
|
24
|
+
"type": "string"
|
25
|
+
}
|
26
|
+
},
|
27
|
+
"dct_creator_sm": {
|
28
|
+
"type": "array",
|
29
|
+
"items": {
|
30
|
+
"type": "string"
|
31
|
+
}
|
32
|
+
},
|
33
|
+
"dct_publisher_sm": {
|
34
|
+
"type": "array",
|
35
|
+
"items": {
|
36
|
+
"type": "string"
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"schema_provider_s": { "type": "string" },
|
40
|
+
"gbl_resourceClass_sm": {
|
41
|
+
"type": "array",
|
42
|
+
"items": {
|
43
|
+
"type": "string",
|
44
|
+
"enum": [
|
45
|
+
"Datasets",
|
46
|
+
"Maps",
|
47
|
+
"Imagery",
|
48
|
+
"Collections",
|
49
|
+
"Websites",
|
50
|
+
"Web services",
|
51
|
+
"Other"
|
52
|
+
]
|
53
|
+
}
|
54
|
+
},
|
55
|
+
"gbl_resourceType_sm": {
|
56
|
+
"type": "array",
|
57
|
+
"items": {
|
58
|
+
"type": "string"
|
59
|
+
}
|
60
|
+
},
|
61
|
+
"dct_subject_sm": {
|
62
|
+
"type": "array",
|
63
|
+
"items": {
|
64
|
+
"type": "string"
|
65
|
+
}
|
66
|
+
},
|
67
|
+
"dcat_theme_sm": {
|
68
|
+
"type": "array",
|
69
|
+
"items": {
|
70
|
+
"type": "string",
|
71
|
+
"enum": [
|
72
|
+
"Farming",
|
73
|
+
"Biota",
|
74
|
+
"Boundaries",
|
75
|
+
"Climatology, Meteorology and Atmosphere",
|
76
|
+
"Economy",
|
77
|
+
"Elevation",
|
78
|
+
"Environment",
|
79
|
+
"Geoscientific Information",
|
80
|
+
"Health",
|
81
|
+
"Imagery and Base Maps",
|
82
|
+
"Intelligence and Military",
|
83
|
+
"Inland Waters",
|
84
|
+
"Location",
|
85
|
+
"Oceans",
|
86
|
+
"Planning and Cadastral",
|
87
|
+
"Society",
|
88
|
+
"Structure",
|
89
|
+
"Transportation",
|
90
|
+
"Utilities and Communications"
|
91
|
+
]
|
92
|
+
}
|
93
|
+
},
|
94
|
+
"dcat_keyword_sm": {
|
95
|
+
"type": "array",
|
96
|
+
"items": {
|
97
|
+
"type": "string"
|
98
|
+
}
|
99
|
+
},
|
100
|
+
"dct_temporal_sm": {
|
101
|
+
"type": "array",
|
102
|
+
"items": {
|
103
|
+
"type": "string"
|
104
|
+
}
|
105
|
+
},
|
106
|
+
"dct_issued_s": { "type": "string" },
|
107
|
+
"gbl_indexYear_im": {
|
108
|
+
"type": "array",
|
109
|
+
"items": {
|
110
|
+
"type": "integer"
|
111
|
+
}
|
112
|
+
},
|
113
|
+
"gbl_dateRange_drsim": {
|
114
|
+
"type": "array",
|
115
|
+
"items": {
|
116
|
+
"type": "string"
|
117
|
+
}
|
118
|
+
},
|
119
|
+
"dct_spatial_sm": {
|
120
|
+
"type": "array",
|
121
|
+
"items": {
|
122
|
+
"type": "string"
|
123
|
+
}
|
124
|
+
},
|
125
|
+
"locn_geometry": { "type": "string" },
|
126
|
+
"dcat_centroid_ss": { "type": "string" },
|
127
|
+
"dct_relation_sm": {
|
128
|
+
"type": "array",
|
129
|
+
"items": {
|
130
|
+
"type": "string"
|
131
|
+
}
|
132
|
+
},
|
133
|
+
"pcdm_memberOf_sm": {
|
134
|
+
"type": "array",
|
135
|
+
"items": {
|
136
|
+
"type": "string"
|
137
|
+
}
|
138
|
+
},
|
139
|
+
"dct_isPartOf_sm": {
|
140
|
+
"type": "array",
|
141
|
+
"items": {
|
142
|
+
"type": "string"
|
143
|
+
}
|
144
|
+
},
|
145
|
+
"dct_source_sm": {
|
146
|
+
"type": "array",
|
147
|
+
"items": {
|
148
|
+
"type": "string"
|
149
|
+
}
|
150
|
+
},
|
151
|
+
"dct_isVersionOf_sm": {
|
152
|
+
"type": "array",
|
153
|
+
"items": {
|
154
|
+
"type": "string"
|
155
|
+
}
|
156
|
+
},
|
157
|
+
"dct_replaces_sm": {
|
158
|
+
"type": "array",
|
159
|
+
"items": {
|
160
|
+
"type": "string"
|
161
|
+
}
|
162
|
+
},
|
163
|
+
"dct_isReplacedBy_sm": {
|
164
|
+
"type": "array",
|
165
|
+
"items": {
|
166
|
+
"type": "string"
|
167
|
+
}
|
168
|
+
},
|
169
|
+
"dct_rights_sm": {
|
170
|
+
"type": "array",
|
171
|
+
"items": {
|
172
|
+
"type": "string"
|
173
|
+
}
|
174
|
+
},
|
175
|
+
"dct_rightsHolder_sm": {
|
176
|
+
"type": "array",
|
177
|
+
"items": {
|
178
|
+
"type": "string"
|
179
|
+
}
|
180
|
+
},
|
181
|
+
"dct_license_sm": {
|
182
|
+
"type": "array",
|
183
|
+
"items": {
|
184
|
+
"type": "string"
|
185
|
+
}
|
186
|
+
},
|
187
|
+
"dct_accessRights_s": { "type": "string" },
|
188
|
+
"dct_format_s": { "type": "string" },
|
189
|
+
"gbl_fileSize_s": { "type": "string" },
|
190
|
+
"gbl_wxsIdentifier_s": { "type": "string" },
|
191
|
+
"dct_references_s": { "type": "string" },
|
192
|
+
"id": { "type": "string" },
|
193
|
+
"dct_identifier_sm": {
|
194
|
+
"type": "array",
|
195
|
+
"items": {
|
196
|
+
"type": "string"
|
197
|
+
}
|
198
|
+
},
|
199
|
+
"gbl_mdModified_dt": {
|
200
|
+
"type": "string",
|
201
|
+
"format": "date-time"
|
202
|
+
},
|
203
|
+
"gbl_mdVersion_s": {
|
204
|
+
"type": "string",
|
205
|
+
"const": "Aardvark"
|
206
|
+
},
|
207
|
+
"gbl_suppressed_b": { "type": "boolean" },
|
208
|
+
"gbl_georeferenced_b": { "type": "boolean" }
|
209
|
+
},
|
210
|
+
"required": ["id", "dct_title_s", "gbl_resourceClass_sm", "dct_accessRights_s", "gbl_mdVersion_s"]
|
211
|
+
}
|
data/solr/conf/schema.xml
CHANGED
@@ -1,12 +1,11 @@
|
|
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="layer_slug_s" type="string" stored="true" indexed="true" required="true"/>
|
8
7
|
<field name="geoblacklight_version" type="string" stored="true" indexed="true"/>
|
9
|
-
<field name="
|
8
|
+
<field name="id" type="string" stored="true" indexed="true" required="true"/>
|
10
9
|
|
11
10
|
<!-- core generated fields -->
|
12
11
|
<field name="text" type="text_en" stored="false" indexed="true" multiValued="true"
|
@@ -43,6 +42,9 @@
|
|
43
42
|
|
44
43
|
<dynamicField name="*suggest" type="textSuggest" indexed="true" stored="false" multiValued="true" />
|
45
44
|
|
45
|
+
<!-- date range (_drsim) -->
|
46
|
+
<dynamicField name="*_drsim" type="dateRange" stored="true" indexed="true" multiValued="true"/>
|
47
|
+
|
46
48
|
<!-- Spatial field types:
|
47
49
|
|
48
50
|
Solr3:
|
@@ -64,6 +66,7 @@
|
|
64
66
|
<dynamicField name="*_pt" type="location" stored="true" indexed="true"/>
|
65
67
|
<dynamicField name="*_bbox" type="location_rpt" stored="true" indexed="true"/><!-- deprecated -->
|
66
68
|
<dynamicField name="*_geom" type="location_rpt" stored="true" indexed="true"/>
|
69
|
+
<dynamicField name="*_geometry" type="location_rpt" stored="true" indexed="true"/>
|
67
70
|
<dynamicField name="*_bboxtype" type="bbox" stored="true" indexed="true"/>
|
68
71
|
|
69
72
|
</fields>
|
@@ -82,6 +85,9 @@
|
|
82
85
|
A Trie based date field for faster date range queries and date faceting. -->
|
83
86
|
<fieldType name="date" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
|
84
87
|
|
88
|
+
<!-- A DateRange based date field for truly faster date range queries. -->
|
89
|
+
<fieldType name="dateRange" class="solr.DateRangeField"/>
|
90
|
+
|
85
91
|
<!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
|
86
92
|
<fieldtype name="binary" class="solr.BinaryField"/>
|
87
93
|
|
@@ -143,54 +149,56 @@
|
|
143
149
|
<fieldType name="location" class="solr.LatLonType" subFieldSuffix="_d"/>
|
144
150
|
|
145
151
|
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
|
146
|
-
geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers"
|
152
|
+
geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers"/>
|
147
153
|
<!-- Adding field type for bboxField that enables, among other things, overlap ratio calculations -->
|
148
154
|
<fieldType name="bbox" class="solr.BBoxField"
|
149
155
|
geo="true" distanceUnits="kilometers" numberType="pdouble" />
|
150
156
|
<fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
|
157
|
+
|
158
|
+
|
151
159
|
</types>
|
152
160
|
|
153
161
|
<!-- for scoring formula -->
|
154
162
|
<copyField source="dct_spatial_sm" dest="dct_spatial_tmi" maxChars="10000"/>
|
155
163
|
<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="
|
164
|
+
<copyField source="dct_creator_sm" dest="dc_creator_tmi" maxChars="1000"/>
|
165
|
+
<copyField source="dct_description_sm" dest="dc_description_tmi" maxChars="10000"/>
|
166
|
+
<copyField source="dct_format_s" dest="dc_format_ti" maxChars="100"/>
|
167
|
+
<copyField source="dct_identifier_sm" dest="dc_identifier_tmi" maxChars="100"/>
|
168
|
+
<copyField source="dct_publisher_sm" dest="dc_publisher_tmi" maxChars="1000"/>
|
169
|
+
<copyField source="dct_accessRights_s" dest="dc_rights_ti" maxChars="100"/>
|
170
|
+
<copyField source="schema_provider_s" dest="dct_provider_ti" maxChars="1000"/>
|
171
|
+
<copyField source="dct_subject_sm" dest="dc_subject_tmi" maxChars="10000"/>
|
172
|
+
<copyField source="dct_title_s" dest="dc_title_ti" maxChars="1000"/>
|
165
173
|
<copyField source="dct_isPartOf_sm" dest="dct_isPartOf_tmi" maxChars="1000"/>
|
166
|
-
<copyField source="
|
167
|
-
<copyField source="
|
174
|
+
<copyField source="locn_geometry_s" dest="layer_geom_type_ti" maxChars="100"/>
|
175
|
+
<copyField source="id" dest="layer_slug_ti" maxChars="100"/>
|
168
176
|
|
169
177
|
<!-- core text search -->
|
170
178
|
<copyField source="*_s" dest="text" />
|
171
179
|
<copyField source="*_sm" dest="text" />
|
172
180
|
|
173
181
|
<!-- for sorting text fields -->
|
174
|
-
<copyField source="
|
175
|
-
<copyField source="
|
176
|
-
<copyField source="
|
182
|
+
<copyField source="schema_provider_s" dest="schema_provider_sort"/>
|
183
|
+
<copyField source="dct_publisher_sm" dest="dc_publisher_sort"/>
|
184
|
+
<copyField source="dct_title_s" dest="dct_title_sort"/>
|
177
185
|
|
178
186
|
<!-- for spell checking -->
|
179
|
-
<copyField source="
|
180
|
-
<copyField source="
|
181
|
-
<copyField source="
|
182
|
-
<copyField source="
|
183
|
-
<copyField source="
|
187
|
+
<copyField source="dct_title_s" dest="spell"/>
|
188
|
+
<copyField source="dct_creator_sm" dest="spell"/>
|
189
|
+
<copyField source="dct_publisher_sm" dest="spell"/>
|
190
|
+
<copyField source="schema_provider_s" dest="spell"/>
|
191
|
+
<copyField source="dct_subject_sm" dest="spell"/>
|
184
192
|
<copyField source="dct_spatial_sm" dest="spell"/>
|
185
193
|
|
186
194
|
<!-- for suggestions -->
|
187
|
-
<copyField source="
|
188
|
-
<copyField source="
|
189
|
-
<copyField source="
|
190
|
-
<copyField source="
|
191
|
-
<copyField source="
|
195
|
+
<copyField source="dct_title_s" dest="suggest"/>
|
196
|
+
<copyField source="dct_creator_sm" dest="suggest"/>
|
197
|
+
<copyField source="dct_publisher_sm" dest="suggest"/>
|
198
|
+
<copyField source="schema_provider_s" dest="suggest"/>
|
199
|
+
<copyField source="dct_subject_sm" dest="suggest"/>
|
192
200
|
<copyField source="dct_spatial_sm" dest="suggest"/>
|
193
201
|
|
194
202
|
<!-- for bbox value -->
|
195
|
-
<copyField source="
|
203
|
+
<copyField source="locn_geometry" dest="solr_bboxtype"/>
|
196
204
|
</schema>
|
data/solr/conf/solrconfig.xml
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
this file, see http://wiki.apache.org/solr/SolrConfigXml.
|
21
21
|
-->
|
22
22
|
<config>
|
23
|
-
|
23
|
+
|
24
24
|
<!-- Controls what version of Lucene various components of Solr
|
25
25
|
adhere to. Generally, you want to use the latest version to
|
26
26
|
get all bug fixes and improvements. It is highly recommended
|
@@ -28,7 +28,7 @@
|
|
28
28
|
affect both how text is indexed and queried.
|
29
29
|
-->
|
30
30
|
<luceneMatchVersion>7.6</luceneMatchVersion>
|
31
|
-
|
31
|
+
|
32
32
|
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
|
33
33
|
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
|
34
34
|
|
@@ -38,7 +38,7 @@
|
|
38
38
|
<schemaFactory class="ClassicIndexSchemaFactory"/>
|
39
39
|
|
40
40
|
<dataDir>${solr.blacklight-core.data.dir:}</dataDir>
|
41
|
-
|
41
|
+
|
42
42
|
<indexConfig>
|
43
43
|
<lockType>${solr.lock.type:native}</lockType>
|
44
44
|
</indexConfig>
|
@@ -113,7 +113,7 @@
|
|
113
113
|
<int name="ps">0</int>
|
114
114
|
<float name="tie">0.01</float>
|
115
115
|
<str name="fl">*,score</str>
|
116
|
-
<str name="sort">score desc,
|
116
|
+
<str name="sort">score desc, dct_title_sort asc</str>
|
117
117
|
<str name="q.alt">*:*</str>
|
118
118
|
<str name="qf">
|
119
119
|
text^1
|
@@ -126,7 +126,7 @@
|
|
126
126
|
dct_temporal_tmi^5
|
127
127
|
dc_title_ti^6
|
128
128
|
dc_rights_ti^7
|
129
|
-
|
129
|
+
dct_provider_ti^8
|
130
130
|
layer_geom_type_ti^9
|
131
131
|
layer_slug_ti^10
|
132
132
|
dc_identifier_ti^10
|
@@ -142,7 +142,7 @@
|
|
142
142
|
dct_temporal_tmi^5
|
143
143
|
dc_title_ti^6
|
144
144
|
dc_rights_ti^7
|
145
|
-
|
145
|
+
dct_provider_ti^8
|
146
146
|
layer_geom_type_ti^9
|
147
147
|
layer_slug_ti^10
|
148
148
|
dc_identifier_ti^10
|
@@ -151,16 +151,16 @@
|
|
151
151
|
<int name="facet.mincount">1</int>
|
152
152
|
<int name="facet.limit">10</int>
|
153
153
|
<str name="facet.field">dct_isPartOf_sm</str>
|
154
|
-
<str name="facet.field">
|
154
|
+
<str name="facet.field">schema_provider_s</str>
|
155
155
|
<str name="facet.field">dct_spatial_sm</str>
|
156
|
-
<str name="facet.field">
|
157
|
-
<str name="facet.field">
|
158
|
-
<str name="facet.field">
|
159
|
-
<str name="facet.field">
|
160
|
-
<str name="facet.field">
|
161
|
-
<str name="facet.field">
|
162
|
-
<str name="facet.field">
|
163
|
-
<str name="facet.field">
|
156
|
+
<str name="facet.field">dct_creator_sm</str>
|
157
|
+
<str name="facet.field">dct_format_s</str>
|
158
|
+
<str name="facet.field">dct_language_sm</str>
|
159
|
+
<str name="facet.field">dct_publisher_sm</str>
|
160
|
+
<str name="facet.field">dct_accessRights_s</str>
|
161
|
+
<str name="facet.field">dct_subject_sm</str>
|
162
|
+
<str name="facet.field">locn_geometry_s</str>
|
163
|
+
<str name="facet.field">gbl_indexYear_im</str>
|
164
164
|
|
165
165
|
<str name="spellcheck">true</str>
|
166
166
|
</lst>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
RSpec.describe Geoblacklight::HomepageFeatureFacetComponent, type: :component do
|
5
|
+
subject(:rendered) do
|
6
|
+
render_inline_to_capybara_node(described_class.new(**kargs))
|
7
|
+
end
|
8
|
+
|
9
|
+
# Build a search
|
10
|
+
let(:context) { { whatever: :value } }
|
11
|
+
let(:service) { Blacklight::SearchService.new(config: blacklight_config, user_params: user_params, **context) }
|
12
|
+
let(:repository) { Blacklight::Solr::Repository.new(blacklight_config) }
|
13
|
+
let(:user_params) { {} }
|
14
|
+
let(:blacklight_config) { Blacklight::Configuration.new }
|
15
|
+
let(:copy_of_catalog_config) { ::CatalogController.blacklight_config.deep_copy }
|
16
|
+
let(:blacklight_solr) { RSolr.connect(Blacklight.connection_config.except(:adapter)) }
|
17
|
+
|
18
|
+
describe 'homepage' do
|
19
|
+
before do
|
20
|
+
(@response, @document_list) = service.search_results
|
21
|
+
end
|
22
|
+
|
23
|
+
let(:kargs) do
|
24
|
+
{
|
25
|
+
icon: 'home',
|
26
|
+
label: 'geoblacklight.home.institution',
|
27
|
+
facet_field: Settings.FIELDS.PROVIDER,
|
28
|
+
response: @response
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'includes facet links' do
|
33
|
+
expect(rendered).to have_selector('div.category-block')
|
34
|
+
expect(rendered).to have_selector('div.category-icon')
|
35
|
+
expect(rendered).to have_selector('a.home-facet-link')
|
36
|
+
expect(rendered).to have_selector('a.more_facets_link')
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -2,13 +2,14 @@
|
|
2
2
|
require 'spec_helper'
|
3
3
|
|
4
4
|
describe 'Config' do
|
5
|
-
it 'Loads new
|
6
|
-
expect(Settings
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
it 'Loads new Aardvark relationships' do
|
6
|
+
expect(Settings).to respond_to('RELATIONSHIPS_SHOWN')
|
7
|
+
[:field, :query_type, :icon, :label].each do |method|
|
8
|
+
expect(Settings.RELATIONSHIPS_SHOWN.MEMBER_OF).to respond_to(method)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'Loads new v3.4 Settings.FIELDS defaults' do
|
13
|
+
expect(Settings.HOMEPAGE_MAP_GEOM).to eq nil
|
13
14
|
end
|
14
15
|
end
|
@@ -71,13 +71,13 @@ describe CatalogController, type: :controller do
|
|
71
71
|
expect(response.status).to eq 200
|
72
72
|
expect(response.body).not_to be_empty
|
73
73
|
response_values = JSON.parse(response.body)
|
74
|
-
expect(response_values).to include '
|
74
|
+
expect(response_values).to include 'gbl_mdVersion_s' => 'Aardvark'
|
75
75
|
expect(response_values).to include Settings.FIELDS.TITLE => '100 Foot Grid Cambridge MA 2004'
|
76
|
-
expect(response_values).to include Settings.FIELDS.IDENTIFIER => 'urn:geodata.tufts.edu:Tufts.CambridgeGrid100_04'
|
77
|
-
expect(response_values).to include Settings.FIELDS.
|
78
|
-
expect(response_values).to include Settings.FIELDS.
|
79
|
-
expect(response_values).to include Settings.FIELDS.
|
80
|
-
expect(response_values).to include Settings.FIELDS.
|
76
|
+
expect(response_values).to include Settings.FIELDS.IDENTIFIER => ['urn:geodata.tufts.edu:Tufts.CambridgeGrid100_04']
|
77
|
+
expect(response_values).to include Settings.FIELDS.ACCESS_RIGHTS => 'Public'
|
78
|
+
expect(response_values).to include Settings.FIELDS.PROVIDER => 'Tufts'
|
79
|
+
expect(response_values).to include Settings.FIELDS.ID => 'tufts-cambridgegrid100-04'
|
80
|
+
expect(response_values).to include Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-71.163984,-71.052581,42.408316,42.34757)'
|
81
81
|
end
|
82
82
|
end
|
83
83
|
end
|
@@ -41,7 +41,7 @@ feature 'Download layer' do
|
|
41
41
|
end
|
42
42
|
scenario 'clicking jpg download button should redirect to external image' do
|
43
43
|
visit solr_document_path('princeton-02870w62c')
|
44
|
-
expect(page).to have_css("a.btn.btn-default[href='https://
|
44
|
+
expect(page).to have_css("a.btn.btn-default[href='https://libimages.princeton.edu/loris/pudl0076/map_pownall/00000001.jp2/full/full/0/default.jpg']", text: 'Original JPG')
|
45
45
|
end
|
46
46
|
scenario 'options should be available under toggle' do
|
47
47
|
visit solr_document_path('mit-f6rqs4ucovjk2')
|
@@ -3,12 +3,12 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
feature 'feature_layer reference', js: true do
|
5
5
|
scenario 'displays image map layer' do
|
6
|
+
skip 'CORS error - Purdue web services are down'
|
6
7
|
visit solr_document_path '32653ed6-8d83-4692-8a06-bf13ffe2c018'
|
7
8
|
expect(page).to have_css '.leaflet-control-zoom', visible: true
|
8
9
|
expect(page).to have_css 'img.leaflet-image-layer', visible: true
|
9
10
|
end
|
10
11
|
scenario 'displays dynamic layer (all layers)' do
|
11
|
-
pending 'external service disabled cors access'
|
12
12
|
visit solr_document_path '90f14ff4-1359-4beb-b931-5cb41d20ab90'
|
13
13
|
expect(page).to have_css '.leaflet-control-zoom', visible: true
|
14
14
|
expect(page).to have_css 'img.leaflet-image-layer', visible: true
|
@@ -21,9 +21,9 @@ feature 'Home page', js: true do # use js: true for tests which require js, but
|
|
21
21
|
expect(page).to have_css '.category-block', count: 4
|
22
22
|
expect(page).to have_css '.home-facet-link', count: 36
|
23
23
|
expect(page).to have_css 'a.more_facets_link', count: 4
|
24
|
-
click_link '
|
24
|
+
click_link 'Topography'
|
25
25
|
expect(page).to have_css '.filter-name', text: 'Subject'
|
26
|
-
expect(page).to have_css '.filter-value', text: '
|
26
|
+
expect(page).to have_css '.filter-value', text: 'Topography'
|
27
27
|
end
|
28
28
|
scenario 'map should be visible' do
|
29
29
|
within '#main-container' do
|
@@ -39,8 +39,8 @@ feature 'Home page', js: true do # use js: true for tests which require js, but
|
|
39
39
|
expect(page).to have_css '#documents'
|
40
40
|
end
|
41
41
|
scenario 'can search by placename' do
|
42
|
-
click_link '
|
42
|
+
click_link 'New York, New York'
|
43
43
|
results = page.all(:css, 'article.document')
|
44
|
-
expect(results.count).to equal(
|
44
|
+
expect(results.count).to equal(4)
|
45
45
|
end
|
46
46
|
end
|
@@ -9,6 +9,7 @@ feature 'Layer opacity', js: true do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
scenario 'ESRI image service layer should have opacity control' do
|
12
|
+
skip 'CORS error - Purdue web services are down'
|
12
13
|
visit solr_document_path('32653ed6-8d83-4692-8a06-bf13ffe2c018')
|
13
14
|
expect(page).to have_css('div.opacity-text', text: '75%')
|
14
15
|
expect(page.find('img.leaflet-image-layer', match: :first)[:style]).to match(/opacity: 0.75;/)
|
@@ -29,7 +29,7 @@ feature 'Metadata tools' do
|
|
29
29
|
allow(connection).to receive(:get).and_return(response)
|
30
30
|
allow(Faraday).to receive(:new).with(url: 'http://purl.stanford.edu/cg357zz0321.mods').and_return(connection)
|
31
31
|
|
32
|
-
allow(Faraday).to receive(:new).with(hash_including(url:
|
32
|
+
allow(Faraday).to receive(:new).with(hash_including(url: %r{solr/blacklight-core})).and_call_original
|
33
33
|
end
|
34
34
|
|
35
35
|
scenario 'shows up as HTML' do
|
@@ -14,8 +14,8 @@ feature 'Missing metadata', js: true do
|
|
14
14
|
visit solr_document_path('05d-03-noGeomType')
|
15
15
|
expect(page).to have_css('#map')
|
16
16
|
end
|
17
|
-
scenario 'Yields error free show page for no
|
18
|
-
visit solr_document_path('99-0001-
|
17
|
+
scenario 'Yields error free show page for no dct_provider_s' do
|
18
|
+
visit solr_document_path('99-0001-noprovider')
|
19
19
|
expect(page).to have_css('#map')
|
20
20
|
end
|
21
21
|
scenario 'Yields error free show page for no solr_geom' do
|
@@ -15,8 +15,8 @@ feature 'Display related documents' do
|
|
15
15
|
scenario 'Relations should respond to json' do
|
16
16
|
visit relations_solr_document_path('nyu_2451_34635', format: 'json')
|
17
17
|
response = JSON.parse(page.body)
|
18
|
-
expect(response['
|
19
|
-
expect(response['
|
18
|
+
expect(response['relations']).not_to respond_to('source_ancestors')
|
19
|
+
expect(response['relations']['source_descendants']['docs'].first[Settings.FIELDS.ID]).to eq 'nyu_2451_34502'
|
20
20
|
expect(response['current_doc']).to eq 'nyu_2451_34635'
|
21
21
|
end
|
22
22
|
|
@@ -7,6 +7,7 @@ feature 'search results map', js: true do
|
|
7
7
|
expect(page).to have_css '#map'
|
8
8
|
end
|
9
9
|
scenario 'view is scoped to Minnesota' do
|
10
|
+
pending 'Minnesota fixtures have changed.'
|
10
11
|
visit root_path
|
11
12
|
click_link 'Minnesota, United States'
|
12
13
|
expect(page).to have_css '#map'
|
@@ -35,7 +36,7 @@ feature 'search results map', js: true do
|
|
35
36
|
end
|
36
37
|
scenario 'view is scoped to NYC' do
|
37
38
|
visit root_path
|
38
|
-
click_link 'New York, New York
|
39
|
+
click_link 'New York, New York'
|
39
40
|
expect(page).to have_css '#map'
|
40
41
|
bbox = page.find('#map')['data-js-map-render-bbox']
|
41
42
|
|
@@ -8,7 +8,7 @@ feature 'spatial search results overlap ratio' do
|
|
8
8
|
# BBox param is the US upper midwest and Canada, roughly centered on the state of Minnesota
|
9
9
|
visit search_catalog_path(
|
10
10
|
bbox: '-103.196521 39.21962 -84.431873 53.63497',
|
11
|
-
"f[#{Settings.FIELDS.
|
11
|
+
"f[#{Settings.FIELDS.PROVIDER}][]": 'University of Minnesota'
|
12
12
|
)
|
13
13
|
|
14
14
|
# MN State result
|
@@ -30,7 +30,7 @@ feature 'spatial search results overlap ratio' do
|
|
30
30
|
# BBox param is the center to western edge of New York state and Canada, roughly centered on Lake Ontario
|
31
31
|
visit search_catalog_path(
|
32
32
|
bbox: '-83.750499 40.41709 -74.368175 47.963663',
|
33
|
-
"f[#{Settings.FIELDS.
|
33
|
+
"f[#{Settings.FIELDS.PROVIDER}][]": 'Cornell'
|
34
34
|
)
|
35
35
|
|
36
36
|
# NY State result
|
@@ -9,6 +9,11 @@ feature 'Search' do
|
|
9
9
|
|
10
10
|
scenario 'When searching child records from a parent record, supressed records are not hidden', js: true do
|
11
11
|
visit '/catalog/princeton-1r66j405w'
|
12
|
+
|
13
|
+
within('.card.relations.relationship-source_descendants') do
|
14
|
+
expect(page).to have_link(href: /f%5Bdct_source_sm%5D/)
|
15
|
+
end
|
16
|
+
|
12
17
|
click_link 'Browse all 4 records...'
|
13
18
|
expect(page).to have_css '.document', count: 4
|
14
19
|
end
|