arclight 0.0.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.all-contributorsrc +450 -0
- data/.codeclimate.yml +5 -0
- data/.eslintrc +22 -0
- data/.github/workflows/ruby.yml +44 -0
- data/.gitignore +7 -0
- data/.rspec +0 -1
- data/.rubocop.yml +362 -0
- data/.rubocop_todo.yml +122 -0
- data/.solr_wrapper +5 -0
- data/CONTRIBUTING.md +43 -0
- data/CONTRIBUTORS.md +79 -0
- data/Gemfile +41 -0
- data/LICENSE.txt +1 -0
- data/README.md +100 -12
- data/Rakefile +13 -3
- data/app/assets/images/arclight/logo.png +0 -0
- data/app/assets/images/blacklight/bookmark.svg +1 -0
- data/app/assets/images/blacklight/collection.svg +5 -0
- data/app/assets/images/blacklight/compact.svg +1 -0
- data/app/assets/images/blacklight/container.svg +5 -0
- data/app/assets/images/blacklight/ead.svg +1 -0
- data/app/assets/images/blacklight/file.svg +5 -0
- data/app/assets/images/blacklight/folder.svg +1 -0
- data/app/assets/images/blacklight/list.svg +1 -0
- data/app/assets/images/blacklight/minus.svg +1 -0
- data/app/assets/images/blacklight/online.svg +5 -0
- data/app/assets/images/blacklight/pdf.svg +1 -0
- data/app/assets/images/blacklight/plus.svg +1 -0
- data/app/assets/images/blacklight/repository.svg +1 -0
- data/app/assets/javascripts/arclight/arclight.js +4 -0
- data/app/assets/javascripts/arclight/oembed_controller.js +58 -0
- data/app/assets/javascripts/arclight/truncate_controller.js +27 -0
- data/app/assets/stylesheets/arclight/application.scss +14 -0
- data/app/assets/stylesheets/arclight/build.scss +4 -0
- data/app/assets/stylesheets/arclight/modules/collection_search.scss +3 -0
- data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +155 -0
- data/app/assets/stylesheets/arclight/modules/highlights.scss +11 -0
- data/app/assets/stylesheets/arclight/modules/icons.scss +20 -0
- data/app/assets/stylesheets/arclight/modules/layout.scss +220 -0
- data/app/assets/stylesheets/arclight/modules/mastheads.scss +57 -0
- data/app/assets/stylesheets/arclight/modules/repositories.scss +25 -0
- data/app/assets/stylesheets/arclight/modules/repository_card.scss +9 -0
- data/app/assets/stylesheets/arclight/modules/search_form.scss +9 -0
- data/app/assets/stylesheets/arclight/modules/search_results.scss +250 -0
- data/app/assets/stylesheets/arclight/modules/show_collection.scss +38 -0
- data/app/assets/stylesheets/arclight/modules/truncator.scss +58 -0
- data/app/assets/stylesheets/arclight/responsive.scss +13 -0
- data/app/assets/stylesheets/arclight/variables.scss +25 -0
- data/app/components/arclight/access_component.html.erb +14 -0
- data/app/components/arclight/access_component.rb +25 -0
- data/app/components/arclight/bookmark_component.html.erb +25 -0
- data/app/components/arclight/bookmark_component.rb +9 -0
- data/app/components/arclight/breadcrumb_component.rb +40 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.html.erb +34 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.rb +25 -0
- data/app/components/arclight/collection_context_component.html.erb +12 -0
- data/app/components/arclight/collection_context_component.rb +27 -0
- data/app/components/arclight/collection_info_component.html.erb +28 -0
- data/app/components/arclight/collection_info_component.rb +26 -0
- data/app/components/arclight/collection_sidebar_component.html.erb +15 -0
- data/app/components/arclight/collection_sidebar_component.rb +39 -0
- data/app/components/arclight/constraints_component.html.erb +7 -0
- data/app/components/arclight/constraints_component.rb +17 -0
- data/app/components/arclight/document_collection_context_component.html.erb +29 -0
- data/app/components/arclight/document_collection_context_component.rb +28 -0
- data/app/components/arclight/document_collection_hierarchy_component.html.erb +50 -0
- data/app/components/arclight/document_collection_hierarchy_component.rb +62 -0
- data/app/components/arclight/document_component.html.erb +39 -0
- data/app/components/arclight/document_component.rb +49 -0
- data/app/components/arclight/document_components_hierarchy_component.html.erb +32 -0
- data/app/components/arclight/document_components_hierarchy_component.rb +28 -0
- data/app/components/arclight/document_download_component.html.erb +24 -0
- data/app/components/arclight/document_download_component.rb +71 -0
- data/app/components/arclight/embed_component.html.erb +10 -0
- data/app/components/arclight/embed_component.rb +43 -0
- data/app/components/arclight/group_component.html.erb +34 -0
- data/app/components/arclight/group_component.rb +23 -0
- data/app/components/arclight/header_component.html.erb +5 -0
- data/app/components/arclight/header_component.rb +10 -0
- data/app/components/arclight/index_metadata_field_component.html.erb +16 -0
- data/app/components/arclight/index_metadata_field_component.rb +20 -0
- data/app/components/arclight/masthead_component.html.erb +15 -0
- data/app/components/arclight/masthead_component.rb +10 -0
- data/app/components/arclight/metadata_section_component.html.erb +13 -0
- data/app/components/arclight/metadata_section_component.rb +22 -0
- data/app/components/arclight/oembed_viewer_component.html.erb +5 -0
- data/app/components/arclight/oembed_viewer_component.rb +16 -0
- data/app/components/arclight/online_content_filter_component.html.erb +15 -0
- data/app/components/arclight/online_content_filter_component.rb +19 -0
- data/app/components/arclight/online_status_indicator_component.rb +19 -0
- data/app/components/arclight/repository_breadcrumb_component.html.erb +10 -0
- data/app/components/arclight/repository_breadcrumb_component.rb +17 -0
- data/app/components/arclight/repository_location_component.html.erb +20 -0
- data/app/components/arclight/repository_location_component.rb +10 -0
- data/app/components/arclight/search_bar_component.html.erb +27 -0
- data/app/components/arclight/search_bar_component.rb +32 -0
- data/app/components/arclight/search_result_breadcrumbs_component.html.erb +6 -0
- data/app/components/arclight/search_result_breadcrumbs_component.rb +37 -0
- data/app/components/arclight/search_result_component.html.erb +20 -0
- data/app/components/arclight/search_result_component.rb +18 -0
- data/app/components/arclight/search_result_title_component.html.erb +15 -0
- data/app/components/arclight/search_result_title_component.rb +15 -0
- data/app/components/arclight/sidebar_component.html.erb +9 -0
- data/app/components/arclight/sidebar_component.rb +19 -0
- data/app/components/arclight/upper_metadata_layout_component.rb +10 -0
- data/app/components/blacklight/icons/bookmark_component.rb +12 -0
- data/app/components/blacklight/icons/collection_component.rb +14 -0
- data/app/components/blacklight/icons/compact_component.rb +12 -0
- data/app/components/blacklight/icons/container_component.rb +14 -0
- data/app/components/blacklight/icons/ead_component.rb +12 -0
- data/app/components/blacklight/icons/file_component.rb +14 -0
- data/app/components/blacklight/icons/folder_component.rb +12 -0
- data/app/components/blacklight/icons/online_component.rb +15 -0
- data/app/components/blacklight/icons/pdf_component.rb +12 -0
- data/app/components/blacklight/icons/repository_component.rb +12 -0
- data/app/controllers/arclight/repositories_controller.rb +40 -0
- data/app/helpers/arclight/ead_format_helpers.rb +309 -0
- data/app/helpers/arclight/field_config_helpers.rb +26 -0
- data/app/helpers/arclight_helper.rb +108 -0
- data/app/models/arclight/document_downloads.rb +122 -0
- data/app/models/arclight/parent.rb +24 -0
- data/app/models/arclight/parents.rb +39 -0
- data/app/models/arclight/requests/aeon_external_request.rb +42 -0
- data/app/models/arclight/requests/aeon_web_ead.rb +52 -0
- data/app/models/arclight/requests/google_form.rb +49 -0
- data/app/models/concerns/arclight/catalog.rb +44 -0
- data/app/models/concerns/arclight/search_behavior.rb +47 -0
- data/app/models/concerns/arclight/solr_document.rb +159 -0
- data/app/presenters/arclight/index_presenter.rb +10 -0
- data/app/presenters/arclight/show_presenter.rb +54 -0
- data/app/views/arclight/.keep +0 -0
- data/app/views/arclight/_requests.html.erb +7 -0
- data/app/views/arclight/repositories/_repository.html.erb +43 -0
- data/app/views/arclight/repositories/index.html.erb +9 -0
- data/app/views/arclight/repositories/show.html.erb +37 -0
- data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +8 -0
- data/app/views/arclight/requests/_aeon_web_ead.html.erb +6 -0
- data/app/views/arclight/requests/_google_form.html.erb +10 -0
- data/app/views/catalog/_document_list.html.erb +8 -0
- data/app/views/catalog/_group.html.erb +4 -0
- data/app/views/catalog/_group_toggle.html.erb +10 -0
- data/app/views/catalog/_search_results_header.html.erb +3 -0
- data/app/views/catalog/hierarchy.html.erb +19 -0
- data/app/views/catalog/index.html.erb +17 -0
- data/app/views/shared/_breadcrumbs.html.erb +3 -0
- data/app/views/shared/_main_menu_links.html.erb +6 -0
- data/arclight.gemspec +29 -11
- data/bin/rails +13 -0
- data/config/breadcrumbs.rb +24 -0
- data/config/i18n-tasks.yml +134 -0
- data/config/importmap.rb +3 -0
- data/config/locales/arclight.en.yml +100 -0
- data/config/repositories.yml +0 -0
- data/config/routes.rb +6 -0
- data/docker-compose.yml +16 -0
- data/lib/arclight/digital_object.rb +27 -0
- data/lib/arclight/engine.rb +47 -0
- data/lib/arclight/exceptions.rb +19 -0
- data/lib/arclight/hash_absolute_xpath.rb +62 -0
- data/lib/arclight/level_label.rb +46 -0
- data/lib/arclight/missing_id_strategy.rb +21 -0
- data/lib/arclight/normalized_date.rb +49 -0
- data/lib/arclight/normalized_id.rb +30 -0
- data/lib/arclight/normalized_title.rb +33 -0
- data/lib/arclight/repository.rb +116 -0
- data/lib/arclight/routes/hierarchy.rb +19 -0
- data/lib/arclight/routes.rb +8 -0
- data/lib/arclight/traject/ead2_component_config.rb +334 -0
- data/lib/arclight/traject/ead2_config.rb +315 -0
- data/lib/arclight/traject/nokogiri_namespaceless_reader.rb +22 -0
- data/lib/arclight/version.rb +3 -1
- data/lib/arclight/year_range.rb +111 -0
- data/lib/arclight.rb +11 -1
- data/lib/generators/arclight/install_generator.rb +126 -0
- data/lib/generators/arclight/templates/arclight.scss +5 -0
- data/lib/generators/arclight/templates/catalog_controller.rb +422 -0
- data/lib/generators/arclight/templates/config/downloads.yml +25 -0
- data/lib/generators/arclight/templates/config/locales/arclight.en.yml +61 -0
- data/lib/generators/arclight/templates/config/repositories.yml +53 -0
- data/lib/generators/arclight/update_generator.rb +22 -0
- data/lib/tasks/index.rake +84 -0
- data/package.json +30 -0
- data/solr/conf/_rest_managed.json +3 -0
- data/solr/conf/admin-extra.html +31 -0
- data/solr/conf/elevate.xml +36 -0
- data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/conf/protwords.txt +21 -0
- data/solr/conf/schema.xml +400 -0
- data/solr/conf/solrconfig.xml +328 -0
- data/solr/conf/spellings.txt +2 -0
- data/solr/conf/stopwords.txt +58 -0
- data/solr/conf/stopwords_en.txt +58 -0
- data/solr/conf/synonyms.txt +31 -0
- data/solr/conf/xslt/example.xsl +132 -0
- data/solr/conf/xslt/example_atom.xsl +67 -0
- data/solr/conf/xslt/example_rss.xsl +66 -0
- data/solr/conf/xslt/luke.xsl +337 -0
- data/tasks/arclight.rake +72 -0
- data/template.rb +10 -0
- metadata +432 -20
- data/.travis.yml +0 -5
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
+
<!--
|
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
|
5
|
+
this work for additional information regarding copyright ownership.
|
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
|
8
|
+
the License. You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
See the License for the specific language governing permissions and
|
|
16
|
+
limitations under the License.
|
|
17
|
+
-->
|
|
18
|
+
|
|
19
|
+
<!--
|
|
20
|
+
This is the Solr schema file. This file should be named "schema.xml" and
|
|
21
|
+
should be in the conf directory under the solr home
|
|
22
|
+
(i.e. ./solr/conf/schema.xml by default)
|
|
23
|
+
or located where the classloader for the Solr webapp can find it.
|
|
24
|
+
|
|
25
|
+
This example schema is the recommended starting point for users.
|
|
26
|
+
It should be kept correct and concise, usable out-of-the-box.
|
|
27
|
+
|
|
28
|
+
For more information, on how to customize this file, please see
|
|
29
|
+
http://wiki.apache.org/solr/SchemaXml
|
|
30
|
+
|
|
31
|
+
PERFORMANCE NOTE: this schema includes many optional features and should not
|
|
32
|
+
be used for benchmarking. To improve performance one could
|
|
33
|
+
- set stored="false" for all fields possible (esp large fields) when you
|
|
34
|
+
only need to search on the field but don't need to return the original
|
|
35
|
+
value.
|
|
36
|
+
- set indexed="false" if you don't need to search on the field, but only
|
|
37
|
+
return the field as a result of searching on other indexed fields.
|
|
38
|
+
- remove all unneeded copyField statements
|
|
39
|
+
- for best index size and searching performance, set "index" to false
|
|
40
|
+
for all general text fields, use copyField to copy them to the
|
|
41
|
+
catchall "text" field, and use that for searching.
|
|
42
|
+
- For maximum indexing performance, use the StreamingUpdateSolrServer
|
|
43
|
+
java client.
|
|
44
|
+
- Remember to run the JVM in server mode, and use a higher logging level
|
|
45
|
+
that avoids logging every request
|
|
46
|
+
-->
|
|
47
|
+
|
|
48
|
+
<schema name="Arclight Demo Index" version="1.5">
|
|
49
|
+
<!-- attribute "name" is the name of this schema and is only used for display purposes.
|
|
50
|
+
Applications should change this to reflect the nature of the search collection.
|
|
51
|
+
version="1.4" is Solr's version number for the schema syntax and semantics. It should
|
|
52
|
+
not normally be changed by applications.
|
|
53
|
+
1.0: multiValued attribute did not exist, all fields are multiValued by nature
|
|
54
|
+
1.1: multiValued attribute introduced, false by default
|
|
55
|
+
1.2: omitTermFreqAndPositions attribute introduced, true by default except for text fields.
|
|
56
|
+
1.3: removed optional field compress feature
|
|
57
|
+
1.4: default auto-phrase (QueryParser feature) to off
|
|
58
|
+
-->
|
|
59
|
+
|
|
60
|
+
<types>
|
|
61
|
+
<!-- field type definitions. The "name" attribute is
|
|
62
|
+
just a label to be used by field definitions. The "class"
|
|
63
|
+
attribute and any other attributes determine the real
|
|
64
|
+
behavior of the fieldType.
|
|
65
|
+
Class names starting with "solr" refer to java classes in the
|
|
66
|
+
org.apache.solr.analysis package.
|
|
67
|
+
-->
|
|
68
|
+
|
|
69
|
+
<!-- The StrField type is not analyzed, but indexed/stored verbatim. -->
|
|
70
|
+
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true" docValues="true"/>
|
|
71
|
+
|
|
72
|
+
<!-- boolean type: "true" or "false" -->
|
|
73
|
+
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
|
|
74
|
+
<!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
|
|
75
|
+
<fieldtype name="binary" class="solr.BinaryField"/>
|
|
76
|
+
|
|
77
|
+
<!-- The optional sortMissingLast and sortMissingFirst attributes are
|
|
78
|
+
currently supported on types that are sorted internally as strings
|
|
79
|
+
and on numeric types.
|
|
80
|
+
This includes "string","boolean", and, as of 3.5 (and 4.x),
|
|
81
|
+
int, float, long, date, double, including the "Trie" variants.
|
|
82
|
+
- If sortMissingLast="true", then a sort on this field will cause documents
|
|
83
|
+
without the field to come after documents with the field,
|
|
84
|
+
regardless of the requested sort order (asc or desc).
|
|
85
|
+
- If sortMissingFirst="true", then a sort on this field will cause documents
|
|
86
|
+
without the field to come before documents with the field,
|
|
87
|
+
regardless of the requested sort order.
|
|
88
|
+
- If sortMissingLast="false" and sortMissingFirst="false" (the default),
|
|
89
|
+
then default lucene sorting will be used which places docs without the
|
|
90
|
+
field first in an ascending sort and last in a descending sort.
|
|
91
|
+
-->
|
|
92
|
+
<!--
|
|
93
|
+
Numeric field types that index values using KD-trees.
|
|
94
|
+
Point fields don't support FieldCache, so they must have docValues="true" if needed for sorting, faceting, functions, etc.
|
|
95
|
+
-->
|
|
96
|
+
<fieldType name="pint" class="solr.IntPointField" docValues="true"/>
|
|
97
|
+
<fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/>
|
|
98
|
+
<fieldType name="plong" class="solr.LongPointField" docValues="true"/>
|
|
99
|
+
<fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
|
|
100
|
+
|
|
101
|
+
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
|
|
102
|
+
is a more restricted form of the canonical representation of dateTime
|
|
103
|
+
http://www.w3.org/TR/xmlschema-2/#dateTime
|
|
104
|
+
The trailing "Z" designates UTC time and is mandatory.
|
|
105
|
+
Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
|
|
106
|
+
All other components are mandatory.
|
|
107
|
+
|
|
108
|
+
Expressions can also be used to denote calculations that should be
|
|
109
|
+
performed relative to "NOW" to determine the value, ie...
|
|
110
|
+
|
|
111
|
+
NOW/HOUR
|
|
112
|
+
... Round to the start of the current hour
|
|
113
|
+
NOW-1DAY
|
|
114
|
+
... Exactly 1 day prior to now
|
|
115
|
+
NOW/DAY+6MONTHS+3DAYS
|
|
116
|
+
... 6 months and 3 days in the future from the start of
|
|
117
|
+
the current day
|
|
118
|
+
|
|
119
|
+
Consult the DateField javadocs for more information.
|
|
120
|
+
|
|
121
|
+
Note: For faster range queries, consider the tdate type
|
|
122
|
+
-->
|
|
123
|
+
<!-- KD-tree versions of date fields -->
|
|
124
|
+
<fieldType name="pdate" class="solr.DatePointField" docValues="true"/>
|
|
125
|
+
|
|
126
|
+
<!-- The "RandomSortField" is not used to store or search any
|
|
127
|
+
data. You can declare fields of this type it in your schema
|
|
128
|
+
to generate pseudo-random orderings of your docs for sorting
|
|
129
|
+
purposes. The ordering is generated based on the field name
|
|
130
|
+
and the version of the index, As long as the index version
|
|
131
|
+
remains unchanged, and the same field name is reused,
|
|
132
|
+
the ordering of the docs will be consistent.
|
|
133
|
+
If you want different psuedo-random orderings of documents,
|
|
134
|
+
for the same version of the index, use a dynamicField and
|
|
135
|
+
change the name
|
|
136
|
+
-->
|
|
137
|
+
<fieldType name="random" class="solr.RandomSortField" indexed="true" />
|
|
138
|
+
|
|
139
|
+
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
|
|
140
|
+
<analyzer>
|
|
141
|
+
<tokenizer class="solr.ICUTokenizerFactory" />
|
|
142
|
+
<filter class="solr.KeywordRepeatFilterFactory" />
|
|
143
|
+
<filter class="solr.ICUFoldingFilterFactory" />
|
|
144
|
+
<filter class="solr.PorterStemFilterFactory"/>
|
|
145
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
|
|
146
|
+
</analyzer>
|
|
147
|
+
</fieldType>
|
|
148
|
+
|
|
149
|
+
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
|
|
150
|
+
<analyzer type="index">
|
|
151
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory" />
|
|
152
|
+
<filter class="solr.KeywordRepeatFilterFactory" />
|
|
153
|
+
<filter class="solr.WordDelimiterGraphFilterFactory" />
|
|
154
|
+
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" />
|
|
155
|
+
<filter class="solr.EnglishPossessiveFilterFactory"/>
|
|
156
|
+
<filter class="solr.ICUFoldingFilterFactory" />
|
|
157
|
+
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
|
|
158
|
+
<filter class="solr.PorterStemFilterFactory"/>
|
|
159
|
+
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
|
|
160
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
|
|
161
|
+
</analyzer>
|
|
162
|
+
<analyzer type="query">
|
|
163
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory" />
|
|
164
|
+
<filter class="solr.KeywordRepeatFilterFactory" />
|
|
165
|
+
<filter class="solr.WordDelimiterGraphFilterFactory"/>
|
|
166
|
+
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" />
|
|
167
|
+
<filter class="solr.ICUFoldingFilterFactory" />
|
|
168
|
+
<filter class="solr.EnglishPossessiveFilterFactory"/>
|
|
169
|
+
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
|
|
170
|
+
<filter class="solr.PorterStemFilterFactory"/>
|
|
171
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
|
|
172
|
+
</analyzer>
|
|
173
|
+
</fieldType>
|
|
174
|
+
|
|
175
|
+
<fieldType name="identifier_match" class="solr.TextField" positionIncrementGap="100">
|
|
176
|
+
<analyzer type="index">
|
|
177
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
|
178
|
+
<filter class="solr.WordDelimiterGraphFilterFactory"
|
|
179
|
+
catenateWords="1"
|
|
180
|
+
catenateNumbers="1"
|
|
181
|
+
catenateAll="1"
|
|
182
|
+
/>
|
|
183
|
+
<filter class="solr.ICUFoldingFilterFactory" />
|
|
184
|
+
<filter class="solr.FlattenGraphFilterFactory"/> <!-- required on index analyzers after graph filters -->
|
|
185
|
+
</analyzer>
|
|
186
|
+
<analyzer type="query">
|
|
187
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
|
188
|
+
<filter class="solr.WordDelimiterGraphFilterFactory"
|
|
189
|
+
catenateWords="1"
|
|
190
|
+
catenateNumbers="1"
|
|
191
|
+
catenateAll="1"
|
|
192
|
+
/>
|
|
193
|
+
<filter class="solr.ICUFoldingFilterFactory" />
|
|
194
|
+
</analyzer>
|
|
195
|
+
</fieldType>
|
|
196
|
+
|
|
197
|
+
<fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" >
|
|
198
|
+
<analyzer>
|
|
199
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
|
200
|
+
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
|
|
201
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
|
202
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
|
203
|
+
</analyzer>
|
|
204
|
+
</fieldType>
|
|
205
|
+
|
|
206
|
+
<fieldType name="textSuggest" class="solr.TextField" positionIncrementGap="100">
|
|
207
|
+
<analyzer>
|
|
208
|
+
<tokenizer class="solr.KeywordTokenizerFactory"/>
|
|
209
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
|
210
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
|
211
|
+
</analyzer>
|
|
212
|
+
</fieldType>
|
|
213
|
+
|
|
214
|
+
<!-- This is an example of using the KeywordTokenizer along
|
|
215
|
+
With various TokenFilterFactories to produce a sortable field
|
|
216
|
+
that does not include some properties of the source text
|
|
217
|
+
-->
|
|
218
|
+
<fieldType name="alphaNumericSort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
|
|
219
|
+
<analyzer>
|
|
220
|
+
<!-- KeywordTokenizer does no actual tokenizing, so the entire
|
|
221
|
+
input string is preserved as a single token
|
|
222
|
+
-->
|
|
223
|
+
<tokenizer class="solr.KeywordTokenizerFactory"/>
|
|
224
|
+
<!-- The LowerCase TokenFilter does what you expect, which can be
|
|
225
|
+
when you want your sorting to be case insensitive
|
|
226
|
+
-->
|
|
227
|
+
<filter class="solr.LowerCaseFilterFactory" />
|
|
228
|
+
<!-- The TrimFilter removes any leading or trailing whitespace -->
|
|
229
|
+
<filter class="solr.TrimFilterFactory" />
|
|
230
|
+
<!-- The PatternReplaceFilter gives you the flexibility to use
|
|
231
|
+
Java Regular expression to replace any sequence of characters
|
|
232
|
+
matching a pattern with an arbitrary replacement string,
|
|
233
|
+
which may include back references to portions of the original
|
|
234
|
+
string matched by the pattern.
|
|
235
|
+
|
|
236
|
+
See the Java Regular Expression documentation for more
|
|
237
|
+
information on pattern and replacement string syntax.
|
|
238
|
+
|
|
239
|
+
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
|
|
240
|
+
-->
|
|
241
|
+
<filter class="solr.PatternReplaceFilterFactory"
|
|
242
|
+
pattern="([^a-z0-9])" replacement="" replace="all"
|
|
243
|
+
/>
|
|
244
|
+
</analyzer>
|
|
245
|
+
</fieldType>
|
|
246
|
+
|
|
247
|
+
<!-- A specialized field for geospatial search filters and distance sorting. -->
|
|
248
|
+
<fieldType name="location" class="solr.LatLonPointSpatialField" docValues="true" />
|
|
249
|
+
|
|
250
|
+
<fieldType name="_nest_path_" class="solr.NestPathField" />
|
|
251
|
+
|
|
252
|
+
</types>
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
<fields>
|
|
256
|
+
<!-- Valid attributes for fields:
|
|
257
|
+
name: mandatory - the name for the field
|
|
258
|
+
type: mandatory - the name of a previously defined type from the
|
|
259
|
+
<types> section
|
|
260
|
+
indexed: true if this field should be indexed (searchable or sortable)
|
|
261
|
+
stored: true if this field should be retrievable
|
|
262
|
+
multiValued: true if this field may contain multiple values per document
|
|
263
|
+
omitNorms: (expert) set to true to omit the norms associated with
|
|
264
|
+
this field (this disables length normalization and index-time
|
|
265
|
+
boosting for the field, and saves some memory). Only full-text
|
|
266
|
+
fields or fields that need an index-time boost need norms.
|
|
267
|
+
termVectors: [false] set to true to store the term vector for a
|
|
268
|
+
given field.
|
|
269
|
+
When using MoreLikeThis, fields used for similarity should be
|
|
270
|
+
stored for best performance.
|
|
271
|
+
termPositions: Store position information with the term vector.
|
|
272
|
+
This will increase storage costs.
|
|
273
|
+
termOffsets: Store offset information with the term vector. This
|
|
274
|
+
will increase storage costs.
|
|
275
|
+
default: a value that should be used if no value is specified
|
|
276
|
+
when adding a document.
|
|
277
|
+
-->
|
|
278
|
+
|
|
279
|
+
<!-- NOTE: this is not a full list of fields in the index; dynamic fields are also used -->
|
|
280
|
+
<field name="id" type="string" indexed="true" stored="true" required="true" />
|
|
281
|
+
<field name="_version_" type="plong" indexed="true" stored="true" multiValued="false" />
|
|
282
|
+
<field name="timestamp" type="pdate" indexed="true" stored="true" default="NOW" multiValued="false"/>
|
|
283
|
+
<!-- default, catch all search field, also used for search term highlighting (requires stored="true") -->
|
|
284
|
+
<field name="text" type="text" indexed="true" stored="true" multiValued="true"/>
|
|
285
|
+
<field name="unitid_identifier_match" type="identifier_match" indexed="true" stored="false" multiValued="true" />
|
|
286
|
+
|
|
287
|
+
<field name="_root_" type="string" indexed="true" stored="true" docValues="false" />
|
|
288
|
+
<field name="_nest_parent_" type="string" indexed="true" stored="true"/>
|
|
289
|
+
<field name="_nest_path_" type="_nest_path_" indexed="true" stored="true"/>
|
|
290
|
+
|
|
291
|
+
<!-- Dynamic field definitions. If a field name is not found, dynamicFields
|
|
292
|
+
will be used if the name matches any of the patterns.
|
|
293
|
+
RESTRICTION: the glob-like pattern in the name attribute must have
|
|
294
|
+
a "*" only at the start or the end.
|
|
295
|
+
EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)
|
|
296
|
+
Longer patterns will be matched first. if equal size patterns
|
|
297
|
+
both match, the first appearing in the schema will be used. -->
|
|
298
|
+
<dynamicField name="random_*" type="random" />
|
|
299
|
+
|
|
300
|
+
<dynamicField name="*_sort" type="alphaNumericSort" indexed="true" stored="false" multiValued="false" />
|
|
301
|
+
<dynamicField name="*spell" type="textSpell" indexed="true" stored="false" multiValued="true" />
|
|
302
|
+
<dynamicField name="*suggest" type="textSuggest" indexed="true" stored="false" multiValued="true" />
|
|
303
|
+
|
|
304
|
+
<!-- uncomment the following to ignore any fields that don't already match an existing
|
|
305
|
+
field name or dynamic field, rather than reporting them as an error.
|
|
306
|
+
alternately, change the type="ignored" to some other type e.g. "text" if you want
|
|
307
|
+
unknown fields indexed and/or stored by default -->
|
|
308
|
+
<!--dynamicField name="*" type="ignored" multiValued="true" /-->
|
|
309
|
+
|
|
310
|
+
<!-- To play nice with atomic updates, only use non-stored fields for copyFields -->
|
|
311
|
+
<dynamicField name="*_tesim" type="text_en" stored="true" indexed="true" multiValued="true" />
|
|
312
|
+
<dynamicField name="*_tesm" type="text_en" stored="true" indexed="false" multiValued="true" />
|
|
313
|
+
<dynamicField name="*_teim" type="text_en" stored="false" indexed="true" multiValued="true" />
|
|
314
|
+
<dynamicField name="*_si" type="string" stored="false" indexed="true" multiValued="false" />
|
|
315
|
+
<dynamicField name="*_sim" type="string" stored="false" indexed="true" multiValued="true" />
|
|
316
|
+
<dynamicField name="*_ssm" type="string" stored="true" indexed="false" multiValued="true" />
|
|
317
|
+
<dynamicField name="*_ssi" type="string" stored="true" indexed="true" multiValued="false" />
|
|
318
|
+
<dynamicField name="*_ssim" type="string" stored="true" indexed="true" multiValued="true" />
|
|
319
|
+
<dynamicField name="*_isim" type="pint" stored="true" indexed="true" multiValued="true" />
|
|
320
|
+
<dynamicField name="*_is" type="pint" stored="true" indexed="false" multiValued="false" />
|
|
321
|
+
<dynamicField name="*_ii" type="pint" stored="false" indexed="true" multiValued="false" />
|
|
322
|
+
<dynamicField name="*_isi" type="pint" stored="true" indexed="true" multiValued="false" />
|
|
323
|
+
</fields>
|
|
324
|
+
|
|
325
|
+
<!-- Field to use to determine and enforce document uniqueness.
|
|
326
|
+
Unless this field is marked with required="false", it will be a required field
|
|
327
|
+
-->
|
|
328
|
+
<uniqueKey>id</uniqueKey>
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
<!-- copyField commands copy one field to another at the time a document
|
|
332
|
+
is added to the index. It's used either to index the same field differently,
|
|
333
|
+
or to add multiple fields to the same field for easier/faster searching. -->
|
|
334
|
+
<!-- Copy Fields -->
|
|
335
|
+
|
|
336
|
+
<!-- field-based searches -->
|
|
337
|
+
<copyField source="normalized_title_ssm" dest="normalized_title_teim"/>
|
|
338
|
+
<copyField source="places_ssim" dest="place_teim"/>
|
|
339
|
+
<copyField source="names_ssim" dest="name_teim"/>
|
|
340
|
+
<copyField source="access_subjects_ssim" dest="subject_teim"/>
|
|
341
|
+
<copyField source="containers_ssim" dest="container_teim" />
|
|
342
|
+
|
|
343
|
+
<!-- The catch all `text` field -->
|
|
344
|
+
<!-- grab the fielded searches -->
|
|
345
|
+
<copyField source="normalized_title_ssm" dest="text" />
|
|
346
|
+
<copyField source="places_ssim" dest="text" />
|
|
347
|
+
<copyField source="names_ssim" dest="text" />
|
|
348
|
+
<copyField source="access_subjects_ssim" dest="text" />
|
|
349
|
+
<copyField source="containers_ssim" dest="text" />
|
|
350
|
+
|
|
351
|
+
<!-- grab the searchable notes (SEARCHABLE_NOTES_FIELDS) -->
|
|
352
|
+
<copyField source="accessrestrict_tesim" dest="text" />
|
|
353
|
+
<copyField source="accruals_tesim" dest="text" />
|
|
354
|
+
<copyField source="acqinfo_tesim" dest="text" />
|
|
355
|
+
<copyField source="altformavail_tesim" dest="text" />
|
|
356
|
+
<copyField source="appraisal_tesim" dest="text" />
|
|
357
|
+
<copyField source="arrangement_tesim" dest="text" />
|
|
358
|
+
<copyField source="bibliography_tesim" dest="text" />
|
|
359
|
+
<copyField source="bioghist_tesim" dest="text" />
|
|
360
|
+
<copyField source="custodhist_tesim" dest="text" />
|
|
361
|
+
<copyField source="fileplan_tesim" dest="text" />
|
|
362
|
+
<copyField source="indexes_tesim" dest="text" />
|
|
363
|
+
<copyField source="language_ssim" dest="text" />
|
|
364
|
+
<copyField source="odd_tesim" dest="text" />
|
|
365
|
+
<copyField source="originalsloc_tesim" dest="text" />
|
|
366
|
+
<copyField source="parent_unittitles_tesim" dest="text" />
|
|
367
|
+
<copyField source="physdesc_tesim" dest="text" />
|
|
368
|
+
<copyField source="phystech_tesim" dest="text" />
|
|
369
|
+
<copyField source="processinfo_tesim" dest="text" />
|
|
370
|
+
<copyField source="relatedmaterial_tesim" dest="text" />
|
|
371
|
+
<copyField source="scopecontent_tesim" dest="text" />
|
|
372
|
+
<copyField source="separatedmaterial_tesim" dest="text" />
|
|
373
|
+
<copyField source="userestrict_tesim" dest="text" />
|
|
374
|
+
<!-- did searchable notes (DID_SEARCHABLE_NOTES_FIELDS) -->
|
|
375
|
+
<copyField source="abstract_tesim" dest="text" />
|
|
376
|
+
<copyField source="materialspec_tesim" dest="text" />
|
|
377
|
+
<copyField source="physloc_tesim" dest="text" />
|
|
378
|
+
<copyField source="note_tesim" dest="text" />
|
|
379
|
+
<!-- grab structured data that's important -->
|
|
380
|
+
<copyField source="unitid_ssm" dest="text" />
|
|
381
|
+
<copyField source="unitid_ssm" dest="unitid_identifier_match" />
|
|
382
|
+
|
|
383
|
+
<!-- sort fields -->
|
|
384
|
+
<copyField source="normalized_title_ssm" dest="title_sort"/> <!-- TODO: assumes single values -->
|
|
385
|
+
<copyField source="normalized_date_ssm" dest="date_sort"/> <!-- TODO: assumes single values -->
|
|
386
|
+
|
|
387
|
+
<!-- spellcheck fields -->
|
|
388
|
+
<!-- default spell check; should match fields for default request handler -->
|
|
389
|
+
<!-- it won't work with a copy of a copy field -->
|
|
390
|
+
<copyField source="*_t" dest="spell"/>
|
|
391
|
+
|
|
392
|
+
<!-- for suggestions -->
|
|
393
|
+
<copyField source="normalized_title_ssm" dest="suggest"/>
|
|
394
|
+
<copyField source="collection_ssim" dest="suggest"/>
|
|
395
|
+
<copyField source="names_ssim" dest="suggest"/>
|
|
396
|
+
<copyField source="repository_ssim" dest="suggest"/>
|
|
397
|
+
<copyField source="places_ssim" dest="suggest"/>
|
|
398
|
+
<copyField source="access_subjects_ssim" dest="suggest"/>
|
|
399
|
+
|
|
400
|
+
</schema>
|