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
@@ -0,0 +1,24 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright ownership.
|
4
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with
|
6
|
+
# the License. You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
|
16
|
+
user=
|
17
|
+
solr_hostname=localhost
|
18
|
+
solr_port=8983
|
19
|
+
rsyncd_port=18983
|
20
|
+
data_dir=
|
21
|
+
webapp_name=solr
|
22
|
+
master_host=
|
23
|
+
master_data_dir=
|
24
|
+
master_status_dir=
|
@@ -0,0 +1,391 @@
|
|
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 a stripped down config file used for a simple example...
|
21
|
+
It is *not* a good example to work from.
|
22
|
+
-->
|
23
|
+
<config>
|
24
|
+
|
25
|
+
<!-- Controls what version of Lucene various components of Solr
|
26
|
+
adhere to. Generally, you want to use the latest version to
|
27
|
+
get all bug fixes and improvements. It is highly recommended
|
28
|
+
that you fully re-index after changing this setting as it can
|
29
|
+
affect both how text is indexed and queried.
|
30
|
+
-->
|
31
|
+
<luceneMatchVersion>5.0.0</luceneMatchVersion>
|
32
|
+
|
33
|
+
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
|
34
|
+
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
|
35
|
+
|
36
|
+
<directoryFactory name="DirectoryFactory"
|
37
|
+
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}">
|
38
|
+
</directoryFactory>
|
39
|
+
|
40
|
+
<codecFactory class="solr.SchemaCodecFactory"/>
|
41
|
+
|
42
|
+
<schemaFactory class="ClassicIndexSchemaFactory"/>
|
43
|
+
|
44
|
+
|
45
|
+
<dataDir>${solr.blacklight-core.data.dir:}</dataDir>
|
46
|
+
|
47
|
+
<requestDispatcher handleSelect="true" >
|
48
|
+
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
|
49
|
+
</requestDispatcher>
|
50
|
+
|
51
|
+
<requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
|
52
|
+
|
53
|
+
<!-- config for the admin interface -->
|
54
|
+
<admin>
|
55
|
+
<defaultQuery>*:*</defaultQuery>
|
56
|
+
</admin>
|
57
|
+
|
58
|
+
<!-- SearchHandler
|
59
|
+
|
60
|
+
http://wiki.apache.org/solr/SearchHandler
|
61
|
+
|
62
|
+
For processing Search Queries, the primary Request Handler
|
63
|
+
provided with Solr is "SearchHandler" It delegates to a sequent
|
64
|
+
of SearchComponents (see below) and supports distributed
|
65
|
+
queries across multiple shards
|
66
|
+
-->
|
67
|
+
<requestHandler name="search" class="solr.SearchHandler" default="true">
|
68
|
+
<!-- default values for query parameters can be specified, these
|
69
|
+
will be overridden by parameters in the request
|
70
|
+
-->
|
71
|
+
<lst name="defaults">
|
72
|
+
<str name="defType">dismax</str>
|
73
|
+
<str name="echoParams">explicit</str>
|
74
|
+
<int name="rows">10</int>
|
75
|
+
|
76
|
+
<str name="q.alt">*:*</str>
|
77
|
+
<str name="mm">2<-1 5<-2 6<90%</str>
|
78
|
+
|
79
|
+
<!-- this qf and pf are used by default, if not otherwise specified by
|
80
|
+
client. The default blacklight_config will use these for the
|
81
|
+
"keywords" search. See the author_qf/author_pf, title_qf, etc
|
82
|
+
below, which the default blacklight_config will specify for
|
83
|
+
those searches. You may also be interested in:
|
84
|
+
http://wiki.apache.org/solr/LocalParams
|
85
|
+
-->
|
86
|
+
|
87
|
+
<str name="qf">
|
88
|
+
title_unstem_search^100000
|
89
|
+
subtitle_unstem_search^50000
|
90
|
+
title_t^25000
|
91
|
+
subtitle_t^10000
|
92
|
+
title_addl_unstem_search^5000
|
93
|
+
title_addl_t^2500
|
94
|
+
title_added_entry_unstem_search^1500
|
95
|
+
title_added_entry_t^1250
|
96
|
+
subject_topic_unstem_search^1000
|
97
|
+
subject_unstem_search^750
|
98
|
+
subject_topic_facet^625
|
99
|
+
subject_t^500
|
100
|
+
author_unstem_search^250
|
101
|
+
author_addl_unstem_search^250
|
102
|
+
author_t^100
|
103
|
+
author_addl_t^50
|
104
|
+
subject_addl_unstem_search^250
|
105
|
+
subject_addl_t^50
|
106
|
+
title_series_unstem_search^25
|
107
|
+
title_series_t^10
|
108
|
+
isbn_t
|
109
|
+
text
|
110
|
+
</str>
|
111
|
+
<str name="pf">
|
112
|
+
title_unstem_search^1000000
|
113
|
+
subtitle_unstem_search^500000
|
114
|
+
title_t^250000
|
115
|
+
subtitle_t^100000
|
116
|
+
title_addl_unstem_search^50000
|
117
|
+
title_addl_t^25000
|
118
|
+
title_added_entry_unstem_search^15000
|
119
|
+
title_added_entry_t^12500
|
120
|
+
subject_topic_unstem_search^10000
|
121
|
+
subject_unstem_search^7500
|
122
|
+
subject_topic_facet^6250
|
123
|
+
subject_t^5000
|
124
|
+
author_unstem_search^2500
|
125
|
+
author_addl_unstem_search^2500
|
126
|
+
author_t^1000
|
127
|
+
author_addl_t^500
|
128
|
+
subject_addl_unstem_search^2500
|
129
|
+
subject_addl_t^500
|
130
|
+
title_series_unstem_search^250
|
131
|
+
title_series_t^100
|
132
|
+
text^10
|
133
|
+
</str>
|
134
|
+
<str name="author_qf">
|
135
|
+
author_unstem_search^200
|
136
|
+
author_addl_unstem_search^50
|
137
|
+
author_t^20
|
138
|
+
author_addl_t
|
139
|
+
</str>
|
140
|
+
<str name="author_pf">
|
141
|
+
author_unstem_search^2000
|
142
|
+
author_addl_unstem_search^500
|
143
|
+
author_t^200
|
144
|
+
author_addl_t^10
|
145
|
+
</str>
|
146
|
+
<str name="title_qf">
|
147
|
+
title_unstem_search^50000
|
148
|
+
subtitle_unstem_search^25000
|
149
|
+
title_addl_unstem_search^10000
|
150
|
+
title_t^5000
|
151
|
+
subtitle_t^2500
|
152
|
+
title_addl_t^100
|
153
|
+
title_added_entry_unstem_search^50
|
154
|
+
title_added_entry_t^10
|
155
|
+
title_series_unstem_search^5
|
156
|
+
title_series_t
|
157
|
+
</str>
|
158
|
+
<str name="title_pf">
|
159
|
+
title_unstem_search^500000
|
160
|
+
subtitle_unstem_search^250000
|
161
|
+
title_addl_unstem_search^100000
|
162
|
+
title_t^50000
|
163
|
+
subtitle_t^25000
|
164
|
+
title_addl_t^1000
|
165
|
+
title_added_entry_unstem_search^500
|
166
|
+
title_added_entry_t^100
|
167
|
+
title_series_t^50
|
168
|
+
title_series_unstem_search^10
|
169
|
+
</str>
|
170
|
+
<str name="subject_qf">
|
171
|
+
subject_topic_unstem_search^200
|
172
|
+
subject_unstem_search^125
|
173
|
+
subject_topic_facet^100
|
174
|
+
subject_t^50
|
175
|
+
subject_addl_unstem_search^10
|
176
|
+
subject_addl_t
|
177
|
+
</str>
|
178
|
+
<str name="subject_pf">
|
179
|
+
subject_topic_unstem_search^2000
|
180
|
+
subject_unstem_search^1250
|
181
|
+
subject_t^1000
|
182
|
+
subject_topic_facet^500
|
183
|
+
subject_addl_unstem_search^100
|
184
|
+
subject_addl_t^10
|
185
|
+
</str>
|
186
|
+
|
187
|
+
<int name="ps">3</int>
|
188
|
+
<float name="tie">0.01</float>
|
189
|
+
|
190
|
+
<!-- NOT using marc_display because it is large and will slow things down for search results -->
|
191
|
+
<str name="fl">
|
192
|
+
id,
|
193
|
+
score,
|
194
|
+
author_display,
|
195
|
+
author_vern_display,
|
196
|
+
format,
|
197
|
+
isbn_t,
|
198
|
+
language_facet,
|
199
|
+
lc_callnum_display,
|
200
|
+
material_type_display,
|
201
|
+
published_display,
|
202
|
+
published_vern_display,
|
203
|
+
pub_date,
|
204
|
+
title_display,
|
205
|
+
title_vern_display,
|
206
|
+
subject_topic_facet,
|
207
|
+
subject_geo_facet,
|
208
|
+
subject_era_facet,
|
209
|
+
subtitle_display,
|
210
|
+
subtitle_vern_display,
|
211
|
+
url_fulltext_display,
|
212
|
+
url_suppl_display,
|
213
|
+
</str>
|
214
|
+
|
215
|
+
<str name="facet">true</str>
|
216
|
+
<str name="facet.mincount">1</str>
|
217
|
+
<str name="facet.limit">10</str>
|
218
|
+
<str name="facet.field">format</str>
|
219
|
+
<str name="facet.field">lc_1letter_facet</str>
|
220
|
+
<str name="facet.field">lc_alpha_facet</str>
|
221
|
+
<str name="facet.field">lc_b4cutter_facet</str>
|
222
|
+
<str name="facet.field">language_facet</str>
|
223
|
+
<str name="facet.field">pub_date</str>
|
224
|
+
<str name="facet.field">subject_era_facet</str>
|
225
|
+
<str name="facet.field">subject_geo_facet</str>
|
226
|
+
<str name="facet.field">subject_topic_facet</str>
|
227
|
+
|
228
|
+
<str name="spellcheck">true</str>
|
229
|
+
<str name="spellcheck.dictionary">default</str>
|
230
|
+
<str name="spellcheck.onlyMorePopular">true</str>
|
231
|
+
<str name="spellcheck.extendedResults">true</str>
|
232
|
+
<str name="spellcheck.collate">false</str>
|
233
|
+
<str name="spellcheck.count">5</str>
|
234
|
+
|
235
|
+
</lst>
|
236
|
+
<!-- In addition to defaults, "appends" params can be specified
|
237
|
+
to identify values which should be appended to the list of
|
238
|
+
multi-val params from the query (or the existing "defaults").
|
239
|
+
-->
|
240
|
+
<!-- In this example, the param "fq=instock:true" would be appended to
|
241
|
+
any query time fq params the user may specify, as a mechanism for
|
242
|
+
partitioning the index, independent of any user selected filtering
|
243
|
+
that may also be desired (perhaps as a result of faceted searching).
|
244
|
+
|
245
|
+
NOTE: there is *absolutely* nothing a client can do to prevent these
|
246
|
+
"appends" values from being used, so don't use this mechanism
|
247
|
+
unless you are sure you always want it.
|
248
|
+
-->
|
249
|
+
<!--
|
250
|
+
<lst name="appends">
|
251
|
+
<str name="fq">inStock:true</str>
|
252
|
+
</lst>
|
253
|
+
-->
|
254
|
+
<!-- "invariants" are a way of letting the Solr maintainer lock down
|
255
|
+
the options available to Solr clients. Any params values
|
256
|
+
specified here are used regardless of what values may be specified
|
257
|
+
in either the query, the "defaults", or the "appends" params.
|
258
|
+
|
259
|
+
In this example, the facet.field and facet.query params would
|
260
|
+
be fixed, limiting the facets clients can use. Faceting is
|
261
|
+
not turned on by default - but if the client does specify
|
262
|
+
facet=true in the request, these are the only facets they
|
263
|
+
will be able to see counts for; regardless of what other
|
264
|
+
facet.field or facet.query params they may specify.
|
265
|
+
|
266
|
+
NOTE: there is *absolutely* nothing a client can do to prevent these
|
267
|
+
"invariants" values from being used, so don't use this mechanism
|
268
|
+
unless you are sure you always want it.
|
269
|
+
-->
|
270
|
+
<!--
|
271
|
+
<lst name="invariants">
|
272
|
+
<str name="facet.field">cat</str>
|
273
|
+
<str name="facet.field">manu_exact</str>
|
274
|
+
<str name="facet.query">price:[* TO 500]</str>
|
275
|
+
<str name="facet.query">price:[500 TO *]</str>
|
276
|
+
</lst>
|
277
|
+
-->
|
278
|
+
<!-- If the default list of SearchComponents is not desired, that
|
279
|
+
list can either be overridden completely, or components can be
|
280
|
+
prepended or appended to the default list. (see below)
|
281
|
+
-->
|
282
|
+
<!--
|
283
|
+
<arr name="components">
|
284
|
+
<str>nameOfCustomComponent1</str>
|
285
|
+
<str>nameOfCustomComponent2</str>
|
286
|
+
</arr>
|
287
|
+
-->
|
288
|
+
<arr name="last-components">
|
289
|
+
<str>spellcheck</str>
|
290
|
+
</arr>
|
291
|
+
|
292
|
+
</requestHandler>
|
293
|
+
|
294
|
+
<!-- for requests to get a single document; use id=666 instead of q=id:666 -->
|
295
|
+
<requestHandler name="document" class="solr.SearchHandler" >
|
296
|
+
<lst name="defaults">
|
297
|
+
<str name="echoParams">all</str>
|
298
|
+
<str name="fl">*</str>
|
299
|
+
<str name="rows">1</str>
|
300
|
+
<str name="q">{!term f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
|
301
|
+
</lst>
|
302
|
+
</requestHandler>
|
303
|
+
|
304
|
+
<!-- Spell Check
|
305
|
+
|
306
|
+
The spell check component can return a list of alternative spelling
|
307
|
+
suggestions.
|
308
|
+
|
309
|
+
http://wiki.apache.org/solr/SpellCheckComponent
|
310
|
+
-->
|
311
|
+
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
312
|
+
|
313
|
+
<str name="queryAnalyzerFieldType">textSpell</str>
|
314
|
+
|
315
|
+
<!-- Multiple "Spell Checkers" can be declared and used by this
|
316
|
+
component
|
317
|
+
-->
|
318
|
+
|
319
|
+
<!-- a spellchecker built from a field of the main index, and
|
320
|
+
written to disk
|
321
|
+
-->
|
322
|
+
<lst name="spellchecker">
|
323
|
+
<str name="name">default</str>
|
324
|
+
<str name="field">spell</str>
|
325
|
+
<str name="spellcheckIndexDir">./spell</str>
|
326
|
+
<str name="buildOnOptimize">true</str>
|
327
|
+
</lst>
|
328
|
+
<lst name="spellchecker">
|
329
|
+
<str name="name">author</str>
|
330
|
+
<str name="field">author_spell</str>
|
331
|
+
<str name="spellcheckIndexDir">./spell_author</str>
|
332
|
+
<str name="accuracy">0.7</str>
|
333
|
+
<str name="buildOnOptimize">true</str>
|
334
|
+
</lst>
|
335
|
+
<lst name="spellchecker">
|
336
|
+
<str name="name">subject</str>
|
337
|
+
<str name="field">subject_spell</str>
|
338
|
+
<str name="spellcheckIndexDir">./spell_subject</str>
|
339
|
+
<str name="accuracy">0.7</str>
|
340
|
+
<str name="buildOnOptimize">true</str>
|
341
|
+
</lst>
|
342
|
+
<lst name="spellchecker">
|
343
|
+
<str name="name">title</str>
|
344
|
+
<str name="field">title_spell</str>
|
345
|
+
<str name="spellcheckIndexDir">./spell_title</str>
|
346
|
+
<str name="accuracy">0.7</str>
|
347
|
+
<str name="buildOnOptimize">true</str>
|
348
|
+
</lst>
|
349
|
+
|
350
|
+
<!-- a spellchecker that uses a different distance measure -->
|
351
|
+
<!--
|
352
|
+
<lst name="spellchecker">
|
353
|
+
<str name="name">jarowinkler</str>
|
354
|
+
<str name="field">spell</str>
|
355
|
+
<str name="distanceMeasure">
|
356
|
+
org.apache.lucene.search.spell.JaroWinklerDistance
|
357
|
+
</str>
|
358
|
+
<str name="spellcheckIndexDir">spellcheckerJaro</str>
|
359
|
+
</lst>
|
360
|
+
-->
|
361
|
+
|
362
|
+
<!-- a spellchecker that use an alternate comparator
|
363
|
+
|
364
|
+
comparatorClass be one of:
|
365
|
+
1. score (default)
|
366
|
+
2. freq (Frequency first, then score)
|
367
|
+
3. A fully qualified class name
|
368
|
+
-->
|
369
|
+
<!--
|
370
|
+
<lst name="spellchecker">
|
371
|
+
<str name="name">freq</str>
|
372
|
+
<str name="field">lowerfilt</str>
|
373
|
+
<str name="spellcheckIndexDir">spellcheckerFreq</str>
|
374
|
+
<str name="comparatorClass">freq</str>
|
375
|
+
<str name="buildOnCommit">true</str>
|
376
|
+
-->
|
377
|
+
|
378
|
+
<!-- A spellchecker that reads the list of words from a file -->
|
379
|
+
<!--
|
380
|
+
<lst name="spellchecker">
|
381
|
+
<str name="classname">solr.FileBasedSpellChecker</str>
|
382
|
+
<str name="name">file</str>
|
383
|
+
<str name="sourceLocation">spellings.txt</str>
|
384
|
+
<str name="characterEncoding">UTF-8</str>
|
385
|
+
<str name="spellcheckIndexDir">spellcheckerFile</str>
|
386
|
+
</lst>
|
387
|
+
-->
|
388
|
+
</searchComponent>
|
389
|
+
|
390
|
+
</config>
|
391
|
+
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright ownership.
|
4
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with
|
6
|
+
# the License. You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
|
16
|
+
#-----------------------------------------------------------------------
|
17
|
+
# a couple of test stopwords to test that the words are really being
|
18
|
+
# configured from this file:
|
19
|
+
stopworda
|
20
|
+
stopwordb
|
21
|
+
|
22
|
+
#Standard english stop words taken from Lucene's StopAnalyzer
|
23
|
+
a
|
24
|
+
an
|
25
|
+
and
|
26
|
+
are
|
27
|
+
as
|
28
|
+
at
|
29
|
+
be
|
30
|
+
but
|
31
|
+
by
|
32
|
+
for
|
33
|
+
if
|
34
|
+
in
|
35
|
+
into
|
36
|
+
is
|
37
|
+
it
|
38
|
+
no
|
39
|
+
not
|
40
|
+
of
|
41
|
+
on
|
42
|
+
or
|
43
|
+
s
|
44
|
+
such
|
45
|
+
t
|
46
|
+
that
|
47
|
+
the
|
48
|
+
their
|
49
|
+
then
|
50
|
+
there
|
51
|
+
these
|
52
|
+
they
|
53
|
+
this
|
54
|
+
to
|
55
|
+
was
|
56
|
+
will
|
57
|
+
with
|
58
|
+
|