blacklight 5.19.2 → 6.0.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -3
- data/.hound.yml +2 -0
- data/.jshintrc +67 -0
- data/.rubocop_hound.yml +4 -0
- data/.travis.yml +11 -8
- data/Gemfile +11 -21
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +1 -0
- data/app/assets/javascripts/blacklight/core.js +5 -19
- data/app/assets/javascripts/blacklight/facet_load.js +23 -0
- data/app/assets/stylesheets/blacklight/_balanced_list.scss +18 -0
- data/app/assets/stylesheets/blacklight/_blacklight_base.scss +5 -1
- data/app/assets/stylesheets/blacklight/_bookmark.scss +14 -6
- data/app/assets/stylesheets/blacklight/_constraints.scss +52 -0
- data/app/assets/stylesheets/blacklight/_controls.scss +61 -0
- data/app/assets/stylesheets/blacklight/_facets.scss +31 -4
- data/app/assets/stylesheets/blacklight/_header.scss +17 -3
- data/app/assets/stylesheets/blacklight/_pagination.scss +21 -0
- data/app/assets/stylesheets/blacklight/_search_results.scss +28 -0
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +0 -3
- data/app/controllers/concerns/blacklight/bookmarks.rb +1 -1
- data/app/controllers/concerns/blacklight/catalog.rb +3 -45
- data/app/controllers/concerns/blacklight/controller.rb +29 -18
- data/app/controllers/concerns/blacklight/default_component_configuration.rb +4 -3
- data/app/controllers/concerns/blacklight/facet.rb +1 -0
- data/app/controllers/concerns/blacklight/request_builders.rb +4 -107
- data/app/controllers/concerns/blacklight/search_fields.rb +1 -1
- data/app/controllers/concerns/blacklight/search_helper.rb +8 -160
- data/app/controllers/saved_searches_controller.rb +1 -1
- data/app/controllers/search_history_controller.rb +18 -1
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +17 -85
- data/app/helpers/blacklight/catalog_helper_behavior.rb +4 -48
- data/app/helpers/blacklight/component_helper_behavior.rb +9 -2
- data/app/helpers/blacklight/configuration_helper_behavior.rb +3 -43
- data/app/helpers/blacklight/facets_helper_behavior.rb +10 -6
- data/app/helpers/blacklight/layout_helper_behavior.rb +0 -8
- data/app/helpers/blacklight/render_constraints_helper_behavior.rb +9 -10
- data/app/helpers/blacklight/render_partials_helper.rb +1 -3
- data/app/helpers/blacklight/url_helper_behavior.rb +15 -187
- data/{lib → app/models}/blacklight/abstract_repository.rb +0 -15
- data/{lib → app/models}/blacklight/configuration.rb +22 -59
- data/app/models/blacklight/configuration/context.rb +47 -0
- data/{lib → app/models}/blacklight/configuration/facet_field.rb +1 -0
- data/{lib → app/models}/blacklight/configuration/field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/fields.rb +2 -6
- data/{lib → app/models}/blacklight/configuration/search_field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/solr_field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/sort_field.rb +0 -0
- data/{lib → app/models}/blacklight/configuration/tool_config.rb +0 -0
- data/app/models/blacklight/configuration/view_config.rb +9 -0
- data/app/models/blacklight/facet_paginator.rb +14 -28
- data/{lib → app/models}/blacklight/search_builder.rb +16 -24
- data/app/models/blacklight/solr/facet_paginator.rb +6 -2
- data/{lib → app/models}/blacklight/solr/repository.rb +0 -21
- data/{lib → app/models}/blacklight/solr/request.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response.rb +9 -8
- data/{lib → app/models}/blacklight/solr/response/facets.rb +37 -29
- data/{lib → app/models}/blacklight/solr/response/group.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/group_response.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/more_like_this.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/pagination_methods.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/response.rb +0 -0
- data/{lib → app/models}/blacklight/solr/response/spelling.rb +2 -1
- data/{lib → app/models}/blacklight/solr/search_builder.rb +0 -0
- data/app/models/concerns/blacklight/document.rb +11 -27
- data/app/models/concerns/blacklight/document/active_model_shim.rb +8 -0
- data/app/models/concerns/blacklight/solr/document.rb +8 -3
- data/{lib → app/models/concerns}/blacklight/solr/search_builder_behavior.rb +21 -33
- data/app/models/concerns/blacklight/user.rb +0 -9
- data/app/models/record_mailer.rb +0 -1
- data/app/presenters/blacklight/document_presenter.rb +23 -13
- data/app/views/blacklight/nav/_saved_searches.html.erb +1 -1
- data/app/views/blacklight/nav/_search_history.html.erb +1 -1
- data/app/views/bookmarks/_tools.html.erb +1 -2
- data/app/views/bookmarks/index.html.erb +2 -2
- data/app/views/catalog/_document_default.atom.builder +4 -2
- data/app/views/catalog/_facet_index_navigation.html.erb +9 -0
- data/app/views/catalog/_facet_layout.html.erb +2 -3
- data/app/views/catalog/_facet_pagination.html.erb +19 -21
- data/app/views/catalog/_facets.html.erb +2 -3
- data/app/views/catalog/_home_text.html.erb +2 -3
- data/app/views/catalog/_index_header_default.html.erb +2 -2
- data/app/views/catalog/_per_page_widget.html.erb +1 -1
- data/app/views/catalog/_search_form.html.erb +21 -18
- data/app/views/catalog/_sort_widget.html.erb +1 -1
- data/app/views/catalog/_zero_results.html.erb +2 -2
- data/app/views/catalog/facet.html.erb +3 -0
- data/app/views/catalog/index.atom.builder +1 -1
- data/app/views/layouts/blacklight.html.erb +2 -2
- data/app/views/saved_searches/index.html.erb +6 -7
- data/app/views/search_history/index.html.erb +5 -5
- data/app/views/shared/_header_navbar.html.erb +2 -2
- data/blacklight.gemspec +5 -5
- data/config/locales/blacklight.de.yml +1 -4
- data/config/locales/blacklight.en.yml +2 -7
- data/config/locales/blacklight.es.yml +1 -4
- data/config/locales/blacklight.fr.yml +1 -4
- data/config/locales/blacklight.it.yml +1 -4
- data/config/locales/blacklight.pt-BR.yml +1 -4
- data/config/routes.rb +9 -0
- data/db/migrate/20140202020201_create_searches.rb +1 -1
- data/db/migrate/20140202020202_create_bookmarks.rb +1 -1
- data/lib/blacklight.rb +5 -82
- data/lib/blacklight/engine.rb +0 -5
- data/lib/blacklight/parameters.rb +13 -0
- data/lib/blacklight/path.rb +143 -0
- data/lib/blacklight/routes.rb +3 -134
- data/lib/blacklight/routes/exportable.rb +25 -0
- data/lib/blacklight/routes/searchable.rb +20 -0
- data/lib/blacklight/solr.rb +1 -9
- data/lib/blacklight/utils.rb +2 -44
- data/lib/generators/blacklight/controller_generator.rb +7 -4
- data/lib/generators/blacklight/install_generator.rb +16 -9
- data/lib/generators/blacklight/models_generator.rb +18 -0
- data/lib/generators/blacklight/templates/catalog_controller.rb +85 -91
- data/lib/generators/blacklight/test_support_generator.rb +22 -15
- 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 +621 -0
- data/solr/conf/scripts.conf +24 -0
- data/solr/conf/solrconfig.xml +391 -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/solr/sample_solr_documents.yml +1 -0
- data/spec/controllers/blacklight/base_spec.rb +17 -0
- data/spec/controllers/blacklight/search_helper_spec.rb +25 -297
- data/spec/controllers/catalog_controller_spec.rb +7 -6
- data/spec/controllers/saved_searches_controller_spec.rb +1 -0
- data/spec/controllers/search_history_controller_spec.rb +1 -0
- data/spec/features/alternate_controller_spec.rb +10 -10
- data/spec/features/bookmarks_spec.rb +8 -22
- data/spec/features/facets_spec.rb +27 -7
- data/spec/features/record_view_spec.rb +4 -13
- data/spec/features/search_formats_spec.rb +1 -26
- data/spec/features/sitelinks_search_box.rb +1 -1
- data/spec/helpers/blacklight_helper_spec.rb +8 -38
- data/spec/helpers/catalog_helper_spec.rb +0 -8
- data/spec/helpers/configuration_helper_spec.rb +0 -25
- data/spec/helpers/facets_helper_spec.rb +12 -11
- data/spec/helpers/hash_as_hidden_fields_spec.rb +7 -7
- data/spec/helpers/layout_helper_spec.rb +0 -7
- data/spec/helpers/render_constraints_helper_spec.rb +4 -2
- data/spec/helpers/url_helper_spec.rb +13 -254
- data/spec/lib/blacklight/parameters_spec.rb +22 -0
- data/spec/lib/blacklight/path_spec.rb +254 -0
- data/spec/lib/blacklight_spec.rb +6 -2
- data/spec/models/blacklight/configuration/context_spec.rb +33 -0
- data/spec/models/blacklight/document/active_model_shim_spec.rb +33 -0
- data/spec/models/blacklight/document_spec.rb +29 -1
- data/spec/models/blacklight/facet_paginator_spec.rb +14 -13
- data/spec/models/blacklight/search_builder_spec.rb +17 -23
- data/spec/models/blacklight/solr/facet_paginator_spec.rb +11 -1
- data/spec/models/blacklight/solr/response/facets_spec.rb +19 -25
- data/spec/models/blacklight/solr/response/group_response_spec.rb +5 -5
- data/spec/models/blacklight/solr/response_spec.rb +0 -11
- data/spec/models/blacklight/solr/search_builder_spec.rb +49 -57
- data/spec/presenters/document_presenter_spec.rb +15 -42
- data/spec/routing/catalog_routing_spec.rb +7 -11
- data/spec/spec_helper.rb +4 -42
- data/spec/support/controller_level_helpers.rb +17 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -2
- data/spec/views/_user_util_links.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +40 -0
- data/spec/views/catalog/_facet_layout.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_facets.html.erb_spec.rb +2 -2
- data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +8 -8
- data/spec/views/catalog/_sort_and_per_page.html.erb_spec.rb +2 -2
- data/tasks/blacklight.rake +25 -30
- metadata +93 -71
- data/app/assets/stylesheets/blacklight/_catalog.scss +0 -229
- data/app/controllers/concerns/blacklight/search_history.rb +0 -31
- data/app/views/catalog/_refworks_form.html.erb +0 -6
- data/lib/blacklight/configuration/view_config.rb +0 -71
- data/lib/blacklight/rails/routes.rb +0 -29
- data/lib/blacklight/solr_helper.rb +0 -9
- data/lib/generators/blacklight/templates/config/initializers/blacklight_initializer.rb +0 -9
- data/spec/helpers/component_helper_spec.rb +0 -19
- data/spec/lib/blacklight/routes_spec.rb +0 -25
- data/spec/lib/blacklight/solr_helper_spec.rb +0 -12
- data/spec/routing/routes_spec.rb +0 -20
- data/spec/views/catalog/_document_action.html.erb_spec.rb +0 -21
@@ -15,27 +15,34 @@ Generate blacklight testing configurations for blacklight's own tests, or for bl
|
|
15
15
|
def alternate_controller
|
16
16
|
copy_file "alternate_controller.rb", "app/controllers/alternate_controller.rb"
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
routing_code = <<-EOF
|
19
|
+
resource :alternate, controller: 'alternate', only: [:index] do
|
20
|
+
concerns :searchable
|
21
|
+
end
|
22
|
+
EOF
|
23
23
|
|
24
|
+
sentinel = /concern :searchable[^\n]+\n/
|
24
25
|
|
26
|
+
inject_into_file 'config/routes.rb', routing_code, { after: sentinel, force: true }
|
25
27
|
end
|
26
28
|
|
27
|
-
def
|
29
|
+
def solr_document_config
|
30
|
+
insert_into_file 'app/models/solr_document.rb', after: "include Blacklight::Solr::Document" do
|
31
|
+
<<-EOF
|
28
32
|
|
29
|
-
|
30
|
-
|
31
|
-
|
33
|
+
field_semantics.merge!(
|
34
|
+
title: "title_display",
|
35
|
+
author: "author_display",
|
36
|
+
language: "language_facet",
|
37
|
+
format: "format")
|
32
38
|
EOF
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def configure_action_mailer
|
43
|
+
insert_into_file "config/environments/test.rb", :after => "config.action_mailer.delivery_method = :test\n" do <<-EOF
|
44
|
+
config.action_mailer.default_options = {from: 'no-reply@example.org'}
|
45
|
+
EOF
|
39
46
|
end
|
40
47
|
end
|
41
48
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<!--
|
2
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
3
|
+
contributor license agreements. See the NOTICE file distributed with
|
4
|
+
this work for additional information regarding copyright ownership.
|
5
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
6
|
+
(the "License"); you may not use this file except in compliance with
|
7
|
+
the License. You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
-->
|
17
|
+
|
18
|
+
<!-- The content of this page will be statically included into the top
|
19
|
+
of the admin page. Uncomment this as an example to see there the content
|
20
|
+
will show up.
|
21
|
+
|
22
|
+
<hr>
|
23
|
+
<i>This line will appear before the first table</i>
|
24
|
+
<tr>
|
25
|
+
<td colspan="2">
|
26
|
+
This row will be appended to the end of the first table
|
27
|
+
</td>
|
28
|
+
</tr>
|
29
|
+
<hr>
|
30
|
+
|
31
|
+
-->
|
@@ -0,0 +1,36 @@
|
|
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
|
+
<!-- If this file is found in the config directory, it will only be
|
20
|
+
loaded once at startup. If it is found in Solr's data
|
21
|
+
directory, it will be re-loaded every commit.
|
22
|
+
-->
|
23
|
+
|
24
|
+
<elevate>
|
25
|
+
<query text="foo bar">
|
26
|
+
<doc id="1" />
|
27
|
+
<doc id="2" />
|
28
|
+
<doc id="3" />
|
29
|
+
</query>
|
30
|
+
|
31
|
+
<query text="ipod">
|
32
|
+
<doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
|
33
|
+
<doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
|
34
|
+
</query>
|
35
|
+
|
36
|
+
</elevate>
|
@@ -0,0 +1,246 @@
|
|
1
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
2
|
+
# (the "License"); you may not use this file except in compliance with
|
3
|
+
# the License. You may obtain a copy of the License at
|
4
|
+
#
|
5
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
# Syntax:
|
14
|
+
# "source" => "target"
|
15
|
+
# "source".length() > 0 (source cannot be empty.)
|
16
|
+
# "target".length() >= 0 (target can be empty.)
|
17
|
+
|
18
|
+
# example:
|
19
|
+
# "??" => "A"
|
20
|
+
# "\u00C0" => "A"
|
21
|
+
# "\u00C0" => "\u0041"
|
22
|
+
# "??" => "ss"
|
23
|
+
# "\t" => " "
|
24
|
+
# "\n" => ""
|
25
|
+
|
26
|
+
# ?? => A
|
27
|
+
"\u00C0" => "A"
|
28
|
+
|
29
|
+
# ?? => A
|
30
|
+
"\u00C1" => "A"
|
31
|
+
|
32
|
+
# ?? => A
|
33
|
+
"\u00C2" => "A"
|
34
|
+
|
35
|
+
# ?? => A
|
36
|
+
"\u00C3" => "A"
|
37
|
+
|
38
|
+
# ?? => A
|
39
|
+
"\u00C4" => "A"
|
40
|
+
|
41
|
+
# ?? => A
|
42
|
+
"\u00C5" => "A"
|
43
|
+
|
44
|
+
# ?? => AE
|
45
|
+
"\u00C6" => "AE"
|
46
|
+
|
47
|
+
# ?? => C
|
48
|
+
"\u00C7" => "C"
|
49
|
+
|
50
|
+
# ?? => E
|
51
|
+
"\u00C8" => "E"
|
52
|
+
|
53
|
+
# ?? => E
|
54
|
+
"\u00C9" => "E"
|
55
|
+
|
56
|
+
# ?? => E
|
57
|
+
"\u00CA" => "E"
|
58
|
+
|
59
|
+
# ?? => E
|
60
|
+
"\u00CB" => "E"
|
61
|
+
|
62
|
+
# ?? => I
|
63
|
+
"\u00CC" => "I"
|
64
|
+
|
65
|
+
# ?? => I
|
66
|
+
"\u00CD" => "I"
|
67
|
+
|
68
|
+
# ?? => I
|
69
|
+
"\u00CE" => "I"
|
70
|
+
|
71
|
+
# ?? => I
|
72
|
+
"\u00CF" => "I"
|
73
|
+
|
74
|
+
# ?? => IJ
|
75
|
+
"\u0132" => "IJ"
|
76
|
+
|
77
|
+
# ?? => D
|
78
|
+
"\u00D0" => "D"
|
79
|
+
|
80
|
+
# ?? => N
|
81
|
+
"\u00D1" => "N"
|
82
|
+
|
83
|
+
# ?? => O
|
84
|
+
"\u00D2" => "O"
|
85
|
+
|
86
|
+
# ?? => O
|
87
|
+
"\u00D3" => "O"
|
88
|
+
|
89
|
+
# ?? => O
|
90
|
+
"\u00D4" => "O"
|
91
|
+
|
92
|
+
# ?? => O
|
93
|
+
"\u00D5" => "O"
|
94
|
+
|
95
|
+
# ?? => O
|
96
|
+
"\u00D6" => "O"
|
97
|
+
|
98
|
+
# ?? => O
|
99
|
+
"\u00D8" => "O"
|
100
|
+
|
101
|
+
# ?? => OE
|
102
|
+
"\u0152" => "OE"
|
103
|
+
|
104
|
+
# ??
|
105
|
+
"\u00DE" => "TH"
|
106
|
+
|
107
|
+
# ?? => U
|
108
|
+
"\u00D9" => "U"
|
109
|
+
|
110
|
+
# ?? => U
|
111
|
+
"\u00DA" => "U"
|
112
|
+
|
113
|
+
# ?? => U
|
114
|
+
"\u00DB" => "U"
|
115
|
+
|
116
|
+
# ?? => U
|
117
|
+
"\u00DC" => "U"
|
118
|
+
|
119
|
+
# ?? => Y
|
120
|
+
"\u00DD" => "Y"
|
121
|
+
|
122
|
+
# ?? => Y
|
123
|
+
"\u0178" => "Y"
|
124
|
+
|
125
|
+
# ?? => a
|
126
|
+
"\u00E0" => "a"
|
127
|
+
|
128
|
+
# ?? => a
|
129
|
+
"\u00E1" => "a"
|
130
|
+
|
131
|
+
# ?? => a
|
132
|
+
"\u00E2" => "a"
|
133
|
+
|
134
|
+
# ?? => a
|
135
|
+
"\u00E3" => "a"
|
136
|
+
|
137
|
+
# ?? => a
|
138
|
+
"\u00E4" => "a"
|
139
|
+
|
140
|
+
# ?? => a
|
141
|
+
"\u00E5" => "a"
|
142
|
+
|
143
|
+
# ?? => ae
|
144
|
+
"\u00E6" => "ae"
|
145
|
+
|
146
|
+
# ?? => c
|
147
|
+
"\u00E7" => "c"
|
148
|
+
|
149
|
+
# ?? => e
|
150
|
+
"\u00E8" => "e"
|
151
|
+
|
152
|
+
# ?? => e
|
153
|
+
"\u00E9" => "e"
|
154
|
+
|
155
|
+
# ?? => e
|
156
|
+
"\u00EA" => "e"
|
157
|
+
|
158
|
+
# ?? => e
|
159
|
+
"\u00EB" => "e"
|
160
|
+
|
161
|
+
# ?? => i
|
162
|
+
"\u00EC" => "i"
|
163
|
+
|
164
|
+
# ?? => i
|
165
|
+
"\u00ED" => "i"
|
166
|
+
|
167
|
+
# ?? => i
|
168
|
+
"\u00EE" => "i"
|
169
|
+
|
170
|
+
# ?? => i
|
171
|
+
"\u00EF" => "i"
|
172
|
+
|
173
|
+
# ?? => ij
|
174
|
+
"\u0133" => "ij"
|
175
|
+
|
176
|
+
# ?? => d
|
177
|
+
"\u00F0" => "d"
|
178
|
+
|
179
|
+
# ?? => n
|
180
|
+
"\u00F1" => "n"
|
181
|
+
|
182
|
+
# ?? => o
|
183
|
+
"\u00F2" => "o"
|
184
|
+
|
185
|
+
# ?? => o
|
186
|
+
"\u00F3" => "o"
|
187
|
+
|
188
|
+
# ?? => o
|
189
|
+
"\u00F4" => "o"
|
190
|
+
|
191
|
+
# ?? => o
|
192
|
+
"\u00F5" => "o"
|
193
|
+
|
194
|
+
# ?? => o
|
195
|
+
"\u00F6" => "o"
|
196
|
+
|
197
|
+
# ?? => o
|
198
|
+
"\u00F8" => "o"
|
199
|
+
|
200
|
+
# ?? => oe
|
201
|
+
"\u0153" => "oe"
|
202
|
+
|
203
|
+
# ?? => ss
|
204
|
+
"\u00DF" => "ss"
|
205
|
+
|
206
|
+
# ?? => th
|
207
|
+
"\u00FE" => "th"
|
208
|
+
|
209
|
+
# ?? => u
|
210
|
+
"\u00F9" => "u"
|
211
|
+
|
212
|
+
# ?? => u
|
213
|
+
"\u00FA" => "u"
|
214
|
+
|
215
|
+
# ?? => u
|
216
|
+
"\u00FB" => "u"
|
217
|
+
|
218
|
+
# ?? => u
|
219
|
+
"\u00FC" => "u"
|
220
|
+
|
221
|
+
# ?? => y
|
222
|
+
"\u00FD" => "y"
|
223
|
+
|
224
|
+
# ?? => y
|
225
|
+
"\u00FF" => "y"
|
226
|
+
|
227
|
+
# ??? => ff
|
228
|
+
"\uFB00" => "ff"
|
229
|
+
|
230
|
+
# ??? => fi
|
231
|
+
"\uFB01" => "fi"
|
232
|
+
|
233
|
+
# ??? => fl
|
234
|
+
"\uFB02" => "fl"
|
235
|
+
|
236
|
+
# ??? => ffi
|
237
|
+
"\uFB03" => "ffi"
|
238
|
+
|
239
|
+
# ??? => ffl
|
240
|
+
"\uFB04" => "ffl"
|
241
|
+
|
242
|
+
# ??? => ft
|
243
|
+
"\uFB05" => "ft"
|
244
|
+
|
245
|
+
# ??? => st
|
246
|
+
"\uFB06" => "st"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
2
|
+
# (the "License"); you may not use this file except in compliance with
|
3
|
+
# the License. You may obtain a copy of the License at
|
4
|
+
#
|
5
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
#-----------------------------------------------------------------------
|
14
|
+
# Use a protected word file to protect against the stemmer reducing two
|
15
|
+
# unrelated words to the same base word.
|
16
|
+
|
17
|
+
# Some non-words that normally won't be encountered,
|
18
|
+
# just to test that they won't be stemmed.
|
19
|
+
dontstems
|
20
|
+
zwhacky
|
21
|
+
|
@@ -0,0 +1,621 @@
|
|
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="Blacklight 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"/>
|
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
|
+
<!--
|
94
|
+
Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
|
95
|
+
-->
|
96
|
+
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
|
97
|
+
<fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
|
98
|
+
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
|
99
|
+
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
|
100
|
+
|
101
|
+
<!--
|
102
|
+
Numeric field types that index each value at various levels of precision
|
103
|
+
to accelerate range queries when the number of values between the range
|
104
|
+
endpoints is large. See the javadoc for NumericRangeQuery for internal
|
105
|
+
implementation details.
|
106
|
+
|
107
|
+
Smaller precisionStep values (specified in bits) will lead to more tokens
|
108
|
+
indexed per value, slightly larger index size, and faster range queries.
|
109
|
+
A precisionStep of 0 disables indexing at different precision levels.
|
110
|
+
-->
|
111
|
+
<fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
|
112
|
+
<fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
|
113
|
+
<fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
|
114
|
+
<fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
|
115
|
+
|
116
|
+
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
|
117
|
+
is a more restricted form of the canonical representation of dateTime
|
118
|
+
http://www.w3.org/TR/xmlschema-2/#dateTime
|
119
|
+
The trailing "Z" designates UTC time and is mandatory.
|
120
|
+
Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
|
121
|
+
All other components are mandatory.
|
122
|
+
|
123
|
+
Expressions can also be used to denote calculations that should be
|
124
|
+
performed relative to "NOW" to determine the value, ie...
|
125
|
+
|
126
|
+
NOW/HOUR
|
127
|
+
... Round to the start of the current hour
|
128
|
+
NOW-1DAY
|
129
|
+
... Exactly 1 day prior to now
|
130
|
+
NOW/DAY+6MONTHS+3DAYS
|
131
|
+
... 6 months and 3 days in the future from the start of
|
132
|
+
the current day
|
133
|
+
|
134
|
+
Consult the DateField javadocs for more information.
|
135
|
+
|
136
|
+
Note: For faster range queries, consider the tdate type
|
137
|
+
-->
|
138
|
+
<fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
|
139
|
+
|
140
|
+
<!-- A Trie based date field for faster date range queries and date faceting. -->
|
141
|
+
<fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
|
142
|
+
|
143
|
+
<!-- The "RandomSortField" is not used to store or search any
|
144
|
+
data. You can declare fields of this type it in your schema
|
145
|
+
to generate pseudo-random orderings of your docs for sorting
|
146
|
+
purposes. The ordering is generated based on the field name
|
147
|
+
and the version of the index, As long as the index version
|
148
|
+
remains unchanged, and the same field name is reused,
|
149
|
+
the ordering of the docs will be consistent.
|
150
|
+
If you want different psuedo-random orderings of documents,
|
151
|
+
for the same version of the index, use a dynamicField and
|
152
|
+
change the name
|
153
|
+
-->
|
154
|
+
<fieldType name="random" class="solr.RandomSortField" indexed="true" />
|
155
|
+
|
156
|
+
<!-- solr.TextField allows the specification of custom text analyzers
|
157
|
+
specified as a tokenizer and a list of token filters. Different
|
158
|
+
analyzers may be specified for indexing and querying.
|
159
|
+
|
160
|
+
The optional positionIncrementGap puts space between multiple fields of
|
161
|
+
this type on the same document, with the purpose of preventing false phrase
|
162
|
+
matching across fields.
|
163
|
+
|
164
|
+
For more info on customizing your analyzer chain, please see
|
165
|
+
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
|
166
|
+
-->
|
167
|
+
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
|
168
|
+
<analyzer>
|
169
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
170
|
+
<filter class="solr.ICUFoldingFilterFactory" />
|
171
|
+
<filter class="solr.SnowballPorterFilterFactory" language="English" />
|
172
|
+
</analyzer>
|
173
|
+
</fieldType>
|
174
|
+
|
175
|
+
<!-- One can also specify an existing Analyzer class that has a
|
176
|
+
default constructor via the class attribute on the analyzer element
|
177
|
+
<fieldType name="text_greek" class="solr.TextField">
|
178
|
+
<analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
|
179
|
+
</fieldType>
|
180
|
+
-->
|
181
|
+
|
182
|
+
<!-- A text field that only splits on whitespace for exact matching of words -->
|
183
|
+
<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
|
184
|
+
<analyzer>
|
185
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
186
|
+
</analyzer>
|
187
|
+
</fieldType>
|
188
|
+
|
189
|
+
<!-- A general text field that has reasonable, generic
|
190
|
+
cross-language defaults: it tokenizes with StandardTokenizer,
|
191
|
+
removes stop words from case-insensitive "stopwords.txt"
|
192
|
+
(empty by default), and down cases. At query time only, it
|
193
|
+
also applies synonyms. -->
|
194
|
+
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
|
195
|
+
<analyzer type="index">
|
196
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
197
|
+
<!-- in this example, we will only use synonyms at query time
|
198
|
+
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
|
199
|
+
-->
|
200
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
201
|
+
</analyzer>
|
202
|
+
<analyzer type="query">
|
203
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
204
|
+
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
|
205
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
206
|
+
</analyzer>
|
207
|
+
</fieldType>
|
208
|
+
|
209
|
+
<!-- A text field with defaults appropriate for English: it
|
210
|
+
tokenizes with StandardTokenizer, removes English stop words
|
211
|
+
(stopwords_en.txt), down cases, protects words from protwords.txt, and
|
212
|
+
finally applies Porter's stemming. The query time analyzer
|
213
|
+
also applies synonyms from synonyms.txt. -->
|
214
|
+
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
|
215
|
+
<analyzer type="index">
|
216
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
217
|
+
<!-- in this example, we will only use synonyms at query time
|
218
|
+
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
|
219
|
+
-->
|
220
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
221
|
+
<filter class="solr.EnglishPossessiveFilterFactory"/>
|
222
|
+
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
|
223
|
+
<!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
|
224
|
+
<filter class="solr.EnglishMinimalStemFilterFactory"/>
|
225
|
+
-->
|
226
|
+
<filter class="solr.PorterStemFilterFactory"/>
|
227
|
+
</analyzer>
|
228
|
+
<analyzer type="query">
|
229
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
230
|
+
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
|
231
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
232
|
+
<filter class="solr.EnglishPossessiveFilterFactory"/>
|
233
|
+
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
|
234
|
+
<!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
|
235
|
+
<filter class="solr.EnglishMinimalStemFilterFactory"/>
|
236
|
+
-->
|
237
|
+
<filter class="solr.PorterStemFilterFactory"/>
|
238
|
+
</analyzer>
|
239
|
+
</fieldType>
|
240
|
+
|
241
|
+
<!-- A text field with defaults appropriate for English, plus
|
242
|
+
aggressive word-splitting and autophrase features enabled.
|
243
|
+
This field is just like text_en, except it adds
|
244
|
+
WordDelimiterFilter to enable splitting and matching of
|
245
|
+
words on case-change, alpha numeric boundaries, and
|
246
|
+
non-alphanumeric chars. This means certain compound word
|
247
|
+
cases will work, for example query "wi fi" will match
|
248
|
+
document "WiFi" or "wi-fi". However, other cases will still
|
249
|
+
not match, for example if the query is "wifi" and the
|
250
|
+
document is "wi fi" or if the query is "wi-fi" and the
|
251
|
+
document is "wifi".
|
252
|
+
-->
|
253
|
+
<fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
|
254
|
+
<analyzer type="index">
|
255
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
256
|
+
<!-- in this example, we will only use synonyms at query time
|
257
|
+
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
|
258
|
+
-->
|
259
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
|
260
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
261
|
+
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
|
262
|
+
<filter class="solr.PorterStemFilterFactory"/>
|
263
|
+
</analyzer>
|
264
|
+
<analyzer type="query">
|
265
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
266
|
+
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
|
267
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
|
268
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
269
|
+
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
|
270
|
+
<filter class="solr.PorterStemFilterFactory"/>
|
271
|
+
</analyzer>
|
272
|
+
</fieldType>
|
273
|
+
|
274
|
+
<!-- Less flexible matching, but less false matches. Probably not ideal for product names,
|
275
|
+
but may be good for SKUs. Can insert dashes in the wrong place and still match. -->
|
276
|
+
<fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
|
277
|
+
<analyzer>
|
278
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
279
|
+
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
|
280
|
+
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
|
281
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
|
282
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
283
|
+
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
|
284
|
+
<filter class="solr.EnglishMinimalStemFilterFactory"/>
|
285
|
+
<!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
|
286
|
+
possible with WordDelimiterFilter in conjuncton with stemming. -->
|
287
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
288
|
+
</analyzer>
|
289
|
+
</fieldType>
|
290
|
+
|
291
|
+
<!-- Just like text_general except it reverses the characters of
|
292
|
+
each token, to enable more efficient leading wildcard queries. -->
|
293
|
+
<fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100">
|
294
|
+
<analyzer type="index">
|
295
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
296
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
297
|
+
<filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
|
298
|
+
maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
|
299
|
+
</analyzer>
|
300
|
+
<analyzer type="query">
|
301
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
302
|
+
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
|
303
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
304
|
+
</analyzer>
|
305
|
+
</fieldType>
|
306
|
+
|
307
|
+
<fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" >
|
308
|
+
<analyzer>
|
309
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
310
|
+
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
|
311
|
+
<filter class="solr.StandardFilterFactory"/>
|
312
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
313
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
314
|
+
</analyzer>
|
315
|
+
</fieldType>
|
316
|
+
|
317
|
+
<!-- charFilter + WhitespaceTokenizer -->
|
318
|
+
<!--
|
319
|
+
<fieldType name="text_char_norm" class="solr.TextField" positionIncrementGap="100" >
|
320
|
+
<analyzer>
|
321
|
+
<charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
|
322
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
323
|
+
</analyzer>
|
324
|
+
</fieldType>
|
325
|
+
-->
|
326
|
+
|
327
|
+
<!-- This is an example of using the KeywordTokenizer along
|
328
|
+
With various TokenFilterFactories to produce a sortable field
|
329
|
+
that does not include some properties of the source text
|
330
|
+
-->
|
331
|
+
<fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
|
332
|
+
<analyzer>
|
333
|
+
<!-- KeywordTokenizer does no actual tokenizing, so the entire
|
334
|
+
input string is preserved as a single token
|
335
|
+
-->
|
336
|
+
<tokenizer class="solr.KeywordTokenizerFactory"/>
|
337
|
+
<!-- The LowerCase TokenFilter does what you expect, which can be
|
338
|
+
when you want your sorting to be case insensitive
|
339
|
+
-->
|
340
|
+
<filter class="solr.LowerCaseFilterFactory" />
|
341
|
+
<!-- The TrimFilter removes any leading or trailing whitespace -->
|
342
|
+
<filter class="solr.TrimFilterFactory" />
|
343
|
+
<!-- The PatternReplaceFilter gives you the flexibility to use
|
344
|
+
Java Regular expression to replace any sequence of characters
|
345
|
+
matching a pattern with an arbitrary replacement string,
|
346
|
+
which may include back references to portions of the original
|
347
|
+
string matched by the pattern.
|
348
|
+
|
349
|
+
See the Java Regular Expression documentation for more
|
350
|
+
information on pattern and replacement string syntax.
|
351
|
+
|
352
|
+
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
|
353
|
+
-->
|
354
|
+
<filter class="solr.PatternReplaceFilterFactory"
|
355
|
+
pattern="([^a-z])" replacement="" replace="all"
|
356
|
+
/>
|
357
|
+
</analyzer>
|
358
|
+
</fieldType>
|
359
|
+
|
360
|
+
<fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
|
361
|
+
<analyzer>
|
362
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
363
|
+
<filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
|
364
|
+
</analyzer>
|
365
|
+
</fieldtype>
|
366
|
+
|
367
|
+
<fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
|
368
|
+
<analyzer>
|
369
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
370
|
+
<!--
|
371
|
+
The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
|
372
|
+
a token of "foo|1.4" would be indexed as "foo" with a payload of 1.4f
|
373
|
+
Attributes of the DelimitedPayloadTokenFilterFactory :
|
374
|
+
"delimiter" - a one character delimiter. Default is | (pipe)
|
375
|
+
"encoder" - how to encode the following value into a playload
|
376
|
+
float -> org.apache.lucene.analysis.payloads.FloatEncoder,
|
377
|
+
integer -> o.a.l.a.p.IntegerEncoder
|
378
|
+
identity -> o.a.l.a.p.IdentityEncoder
|
379
|
+
Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
|
380
|
+
-->
|
381
|
+
<filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
|
382
|
+
</analyzer>
|
383
|
+
</fieldtype>
|
384
|
+
|
385
|
+
<!-- lowercases the entire field value, keeping it as a single token. -->
|
386
|
+
<fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
|
387
|
+
<analyzer>
|
388
|
+
<tokenizer class="solr.KeywordTokenizerFactory"/>
|
389
|
+
<filter class="solr.LowerCaseFilterFactory" />
|
390
|
+
</analyzer>
|
391
|
+
</fieldType>
|
392
|
+
|
393
|
+
<fieldType name="text_path" class="solr.TextField" positionIncrementGap="100">
|
394
|
+
<analyzer>
|
395
|
+
<tokenizer class="solr.PathHierarchyTokenizerFactory"/>
|
396
|
+
</analyzer>
|
397
|
+
</fieldType>
|
398
|
+
|
399
|
+
<!-- since fields of this type are by default not stored or indexed,
|
400
|
+
any data added to them will be ignored outright. -->
|
401
|
+
<fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
|
402
|
+
|
403
|
+
<!-- This point type indexes the coordinates as separate fields (subFields)
|
404
|
+
If subFieldType is defined, it references a type, and a dynamic field
|
405
|
+
definition is created matching *___<typename>. Alternately, if
|
406
|
+
subFieldSuffix is defined, that is used to create the subFields.
|
407
|
+
Example: if subFieldType="double", then the coordinates would be
|
408
|
+
indexed in fields myloc_0___double,myloc_1___double.
|
409
|
+
Example: if subFieldSuffix="_d" then the coordinates would be indexed
|
410
|
+
in fields myloc_0_d,myloc_1_d
|
411
|
+
The subFields are an implementation detail of the fieldType, and end
|
412
|
+
users normally should not need to know about them.
|
413
|
+
-->
|
414
|
+
<fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
|
415
|
+
|
416
|
+
<!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
|
417
|
+
<fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
|
418
|
+
|
419
|
+
<!--
|
420
|
+
A Geohash is a compact representation of a latitude longitude pair in a single field.
|
421
|
+
See http://wiki.apache.org/solr/SpatialSearch
|
422
|
+
-->
|
423
|
+
<fieldtype name="geohash" class="solr.GeoHashField"/>
|
424
|
+
</types>
|
425
|
+
|
426
|
+
|
427
|
+
<fields>
|
428
|
+
<!-- Valid attributes for fields:
|
429
|
+
name: mandatory - the name for the field
|
430
|
+
type: mandatory - the name of a previously defined type from the
|
431
|
+
<types> section
|
432
|
+
indexed: true if this field should be indexed (searchable or sortable)
|
433
|
+
stored: true if this field should be retrievable
|
434
|
+
multiValued: true if this field may contain multiple values per document
|
435
|
+
omitNorms: (expert) set to true to omit the norms associated with
|
436
|
+
this field (this disables length normalization and index-time
|
437
|
+
boosting for the field, and saves some memory). Only full-text
|
438
|
+
fields or fields that need an index-time boost need norms.
|
439
|
+
termVectors: [false] set to true to store the term vector for a
|
440
|
+
given field.
|
441
|
+
When using MoreLikeThis, fields used for similarity should be
|
442
|
+
stored for best performance.
|
443
|
+
termPositions: Store position information with the term vector.
|
444
|
+
This will increase storage costs.
|
445
|
+
termOffsets: Store offset information with the term vector. This
|
446
|
+
will increase storage costs.
|
447
|
+
default: a value that should be used if no value is specified
|
448
|
+
when adding a document.
|
449
|
+
-->
|
450
|
+
|
451
|
+
<!-- NOTE: this is not a full list of fields in the index; dynamic fields are also used -->
|
452
|
+
<field name="id" type="string" indexed="true" stored="true" required="true" />
|
453
|
+
<field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
|
454
|
+
<!-- default, catch all search field -->
|
455
|
+
<field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
|
456
|
+
|
457
|
+
<!-- these display fields are NOT multi-valued -->
|
458
|
+
<field name="marc_display" type="string" indexed="false" stored="true" multiValued="false"/>
|
459
|
+
<field name="title_display" type="string" indexed="false" stored="true" multiValued="false"/>
|
460
|
+
<field name="title_vern_display" type="string" indexed="false" stored="true" multiValued="false"/>
|
461
|
+
<field name="subtitle_display" type="string" indexed="false" stored="true" multiValued="false"/>
|
462
|
+
<field name="subtitle_vern_display" type="string" indexed="false" stored="true" multiValued="false"/>
|
463
|
+
<field name="author_display" type="string" indexed="false" stored="true" multiValued="false"/>
|
464
|
+
<field name="author_vern_display" type="string" indexed="false" stored="true" multiValued="false"/>
|
465
|
+
|
466
|
+
<!-- these fields are also used for display, so they must be stored -->
|
467
|
+
<field name="isbn_t" type="text" indexed="true" stored="true" multiValued="true"/>
|
468
|
+
<field name="language_facet" type="string" indexed="true" stored="true" multiValued="true" />
|
469
|
+
<field name="subject_topic_facet" type="string" indexed="true" stored="true" multiValued="true" />
|
470
|
+
<field name="subject_era_facet" type="string" indexed="true" stored="true" multiValued="true" />
|
471
|
+
<field name="subject_geo_facet" type="string" indexed="true" stored="true" multiValued="true" />
|
472
|
+
<!-- pub_date is used for facet and display so it must be indexed and stored -->
|
473
|
+
<field name="pub_date" type="string" indexed="true" stored="true" multiValued="true"/>
|
474
|
+
<!-- pub_date sort uses new trie-based int fields, which are recommended for any int and are displayable, sortable, and range-quer
|
475
|
+
we use 'tint' for faster range-queries. -->
|
476
|
+
<field name="pub_date_sort" type="tint" indexed="true" stored="true" multiValued="false"/>
|
477
|
+
|
478
|
+
<!-- format is used for facet, display, and choosing which partial to use for the show view, so it must be stored and indexed -->
|
479
|
+
<field name="format" type="string" indexed="true" stored="true"/>
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
<!-- Dynamic field definitions. If a field name is not found, dynamicFields
|
484
|
+
will be used if the name matches any of the patterns.
|
485
|
+
RESTRICTION: the glob-like pattern in the name attribute must have
|
486
|
+
a "*" only at the start or the end.
|
487
|
+
EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)
|
488
|
+
Longer patterns will be matched first. if equal size patterns
|
489
|
+
both match, the first appearing in the schema will be used. -->
|
490
|
+
<dynamicField name="*_i" type="int" indexed="true" stored="true"/>
|
491
|
+
<dynamicField name="*_s" type="string" indexed="true" stored="true"/>
|
492
|
+
<dynamicField name="*_l" type="long" indexed="true" stored="true"/>
|
493
|
+
<dynamicField name="*_t" type="text" indexed="true" stored="true" multiValued="true"/>
|
494
|
+
<dynamicField name="*_txt" type="text_general" indexed="true" stored="true" multiValued="true"/>
|
495
|
+
<dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
|
496
|
+
<dynamicField name="*_f" type="float" indexed="true" stored="true"/>
|
497
|
+
<dynamicField name="*_d" type="double" indexed="true" stored="true"/>
|
498
|
+
|
499
|
+
<!-- Type used to index the lat and lon components for the "location" FieldType -->
|
500
|
+
<dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false"/>
|
501
|
+
|
502
|
+
<dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
|
503
|
+
<dynamicField name="*_p" type="location" indexed="true" stored="true"/>
|
504
|
+
|
505
|
+
<!-- some trie-coded dynamic fields for faster range queries -->
|
506
|
+
<dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
|
507
|
+
<dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/>
|
508
|
+
<dynamicField name="*_tf" type="tfloat" indexed="true" stored="true"/>
|
509
|
+
<dynamicField name="*_td" type="tdouble" indexed="true" stored="true"/>
|
510
|
+
<dynamicField name="*_tdt" type="tdate" indexed="true" stored="true"/>
|
511
|
+
|
512
|
+
<dynamicField name="ignored_*" type="ignored" multiValued="true"/>
|
513
|
+
<dynamicField name="attr_*" type="text_general" indexed="true" stored="true" multiValued="true"/>
|
514
|
+
|
515
|
+
<dynamicField name="random_*" type="random" />
|
516
|
+
|
517
|
+
<dynamicField name="*_display" type="string" indexed="false" stored="true" multiValued="true" />
|
518
|
+
<dynamicField name="*_facet" type="string" indexed="true" stored="false" multiValued="true" />
|
519
|
+
<dynamicField name="*_sort" type="alphaOnlySort" indexed="true" stored="false" multiValued="false" />
|
520
|
+
<dynamicField name="*_unstem_search" type="text_general" indexed="true" stored="false" multiValued="true" />
|
521
|
+
<dynamicField name="*spell" type="textSpell" indexed="true" stored="false" multiValued="true" />
|
522
|
+
|
523
|
+
<!-- uncomment the following to ignore any fields that don't already match an existing
|
524
|
+
field name or dynamic field, rather than reporting them as an error.
|
525
|
+
alternately, change the type="ignored" to some other type e.g. "text" if you want
|
526
|
+
unknown fields indexed and/or stored by default -->
|
527
|
+
<!--dynamicField name="*" type="ignored" multiValued="true" /-->
|
528
|
+
|
529
|
+
</fields>
|
530
|
+
|
531
|
+
<!-- Field to use to determine and enforce document uniqueness.
|
532
|
+
Unless this field is marked with required="false", it will be a required field
|
533
|
+
-->
|
534
|
+
<uniqueKey>id</uniqueKey>
|
535
|
+
|
536
|
+
<!-- field for the QueryParser to use when an explicit fieldname is absent -->
|
537
|
+
<defaultSearchField>text</defaultSearchField>
|
538
|
+
|
539
|
+
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
|
540
|
+
<solrQueryParser defaultOperator="OR"/>
|
541
|
+
|
542
|
+
<!-- copyField commands copy one field to another at the time a document
|
543
|
+
is added to the index. It's used either to index the same field differently,
|
544
|
+
or to add multiple fields to the same field for easier/faster searching. -->
|
545
|
+
<!-- Copy Fields -->
|
546
|
+
|
547
|
+
<!-- unstemmed fields -->
|
548
|
+
<copyField source="title_t" dest="title_unstem_search"/>
|
549
|
+
<copyField source="subtitle_t" dest="subtitle_unstem_search"/>
|
550
|
+
<copyField source="title_addl_t" dest="title_addl_unstem_search"/>
|
551
|
+
<copyField source="title_added_entry_t" dest="title_added_entry_unstem_search"/>
|
552
|
+
<copyField source="title_series_t" dest="title_series_unstem_search"/>
|
553
|
+
<copyField source="author_t" dest="author_unstem_search"/>
|
554
|
+
<copyField source="author_addl_t" dest="author_addl_unstem_search"/>
|
555
|
+
<copyField source="subject_t" dest="subject_unstem_search"/>
|
556
|
+
<copyField source="subject_addl_t" dest="subject_addl_unstem_search"/>
|
557
|
+
<copyField source="subject_topic_facet" dest="subject_topic_unstem_search"/>
|
558
|
+
|
559
|
+
<!-- sort fields -->
|
560
|
+
<copyField source="pub_date" dest="pub_date_sort"/>
|
561
|
+
|
562
|
+
|
563
|
+
<!-- spellcheck fields -->
|
564
|
+
<!-- default spell check; should match fields for default request handler -->
|
565
|
+
<!-- it won't work with a copy of a copy field -->
|
566
|
+
<copyField source="*_t" dest="spell"/>
|
567
|
+
<copyField source="*_facet" dest="spell"/>
|
568
|
+
<!-- title spell check; should match fields for title request handler -->
|
569
|
+
<copyField source="title_t" dest="title_spell"/>
|
570
|
+
<copyField source="subtitle_t" dest="title_spell"/>
|
571
|
+
<copyField source="addl_titles_t" dest="title_spell"/>
|
572
|
+
<copyField source="title_added_entry_t" dest="title_spell"/>
|
573
|
+
<copyField source="title_series_t" dest="title_spell"/>
|
574
|
+
<!-- author spell check; should match fields for author request handler -->
|
575
|
+
<copyField source="author_t" dest="author_spell"/>
|
576
|
+
<copyField source="author_addl_t" dest="author_spell"/>
|
577
|
+
<!-- subject spell check; should match fields for subject request handler -->
|
578
|
+
<copyField source="subject_topic_facet" dest="subject_spell"/>
|
579
|
+
<copyField source="subject_t" dest="subject_spell"/>
|
580
|
+
<copyField source="subject_addl_t" dest="subject_spell"/>
|
581
|
+
|
582
|
+
<!-- OpenSearch query field should match request handler search fields -->
|
583
|
+
<copyField source="title_t" dest="opensearch_display"/>
|
584
|
+
<copyField source="subtitle_t" dest="opensearch_display"/>
|
585
|
+
<copyField source="addl_titles_t" dest="opensearch_display"/>
|
586
|
+
<copyField source="title_added_entry_t" dest="opensearch_display"/>
|
587
|
+
<copyField source="title_series_t" dest="opensearch_display"/>
|
588
|
+
<copyField source="author_t" dest="opensearch_display"/>
|
589
|
+
<copyField source="author_addl_t" dest="opensearch_display"/>
|
590
|
+
<copyField source="subject_topic_facet" dest="opensearch_display"/>
|
591
|
+
<copyField source="subject_t" dest="opensearch_display"/>
|
592
|
+
<copyField source="subject_addl_t" dest="opensearch_display"/>
|
593
|
+
|
594
|
+
|
595
|
+
<!-- Above, multiple source fields are copied to the [text] field.
|
596
|
+
Another way to map multiple source fields to the same
|
597
|
+
destination field is to use the dynamic field syntax.
|
598
|
+
copyField also supports a maxChars to copy setting. -->
|
599
|
+
|
600
|
+
<!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->
|
601
|
+
|
602
|
+
<!-- copy name to alphaNameSort, a field designed for sorting by name -->
|
603
|
+
<!-- <copyField source="name" dest="alphaNameSort"/> -->
|
604
|
+
|
605
|
+
|
606
|
+
<!-- Similarity is the scoring routine for each document vs. a query.
|
607
|
+
A custom similarity may be specified here, but the default is fine
|
608
|
+
for most applications. -->
|
609
|
+
<!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->
|
610
|
+
<!-- ... OR ...
|
611
|
+
Specify a SimilarityFactory class name implementation
|
612
|
+
allowing parameters to be used.
|
613
|
+
-->
|
614
|
+
<!--
|
615
|
+
<similarity class="com.example.solr.CustomSimilarityFactory">
|
616
|
+
<str name="paramkey">param value</str>
|
617
|
+
</similarity>
|
618
|
+
-->
|
619
|
+
|
620
|
+
|
621
|
+
</schema>
|