arclight 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc +12 -0
  3. data/.gitignore +5 -0
  4. data/.rubocop.yml +66 -0
  5. data/.solr_wrapper +5 -0
  6. data/.travis.yml +30 -2
  7. data/CONTRIBUTING.md +43 -0
  8. data/Gemfile +36 -0
  9. data/LICENSE.txt +1 -0
  10. data/README.md +85 -12
  11. data/Rakefile +14 -3
  12. data/app/assets/images/blacklight/compact.svg +25 -0
  13. data/app/assets/images/blacklight/logo.png +0 -0
  14. data/app/assets/javascripts/arclight/arclight.js +9 -0
  15. data/app/assets/javascripts/arclight/collection_context.js +18 -0
  16. data/app/assets/javascripts/arclight/collection_navigation.js +114 -0
  17. data/app/assets/javascripts/arclight/collection_scrollspy.js +6 -0
  18. data/app/assets/javascripts/arclight/component_ancestors.js +56 -0
  19. data/app/assets/javascripts/arclight/oembed_viewer.js +39 -0
  20. data/app/assets/javascripts/arclight/truncator.js.erb +23 -0
  21. data/app/assets/stylesheets/arclight/application.scss +13 -0
  22. data/app/assets/stylesheets/arclight/bootstrap_overrides.scss +3 -0
  23. data/app/assets/stylesheets/arclight/modules/collection_search.scss +3 -0
  24. data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +174 -0
  25. data/app/assets/stylesheets/arclight/modules/highlights.scss +10 -0
  26. data/app/assets/stylesheets/arclight/modules/layout.scss +33 -0
  27. data/app/assets/stylesheets/arclight/modules/mastheads.scss +60 -0
  28. data/app/assets/stylesheets/arclight/modules/repositories.scss +29 -0
  29. data/app/assets/stylesheets/arclight/modules/repository_card.scss +54 -0
  30. data/app/assets/stylesheets/arclight/modules/search_results.scss +75 -0
  31. data/app/assets/stylesheets/arclight/modules/show_collection.scss +78 -0
  32. data/app/assets/stylesheets/arclight/modules/sidebar.scss +16 -0
  33. data/app/assets/stylesheets/arclight/variables.scss +2 -0
  34. data/app/controllers/arclight/repositories_controller.rb +40 -0
  35. data/app/controllers/concerns/arclight/field_config_helpers.rb +86 -0
  36. data/app/factories/blacklight_field_configuration_factory.rb +29 -0
  37. data/app/helpers/arclight_helper.rb +173 -0
  38. data/app/models/arclight/parent.rb +24 -0
  39. data/app/models/arclight/parents.rb +34 -0
  40. data/app/models/arclight/requests/google_form.rb +44 -0
  41. data/app/models/concerns/arclight/catalog.rb +22 -0
  42. data/app/models/concerns/arclight/search_behavior.rb +46 -0
  43. data/app/models/concerns/arclight/solr_document.rb +131 -0
  44. data/app/presenters/arclight/index_presenter.rb +10 -0
  45. data/app/presenters/arclight/show_presenter.rb +27 -0
  46. data/app/views/arclight/.keep +0 -0
  47. data/app/views/arclight/repositories/_in_person_repository.html.erb +19 -0
  48. data/app/views/arclight/repositories/_repository.html.erb +62 -0
  49. data/app/views/arclight/repositories/index.html.erb +4 -0
  50. data/app/views/arclight/repositories/show.html.erb +38 -0
  51. data/app/views/arclight/requests/_google_form.html.erb +11 -0
  52. data/app/views/arclight/viewers/_oembed.html.erb +7 -0
  53. data/app/views/catalog/_arclight_document_index_header.html.erb +13 -0
  54. data/app/views/catalog/_arclight_document_index_header_hierarchy_default.html.erb +0 -0
  55. data/app/views/catalog/_arclight_document_index_header_online_contents_default.html.erb +0 -0
  56. data/app/views/catalog/_arclight_document_show_header.html.erb +15 -0
  57. data/app/views/catalog/_arclight_document_show_header_collection.html.erb +12 -0
  58. data/app/views/catalog/_arclight_index_compact_default.html.erb +15 -0
  59. data/app/views/catalog/_arclight_online_content_indicator.html.erb +5 -0
  60. data/app/views/catalog/_arclight_rangelimit.html.erb +24 -0
  61. data/app/views/catalog/_arclight_viewer_default.html.erb +1 -0
  62. data/app/views/catalog/_collection_contents.html.erb +12 -0
  63. data/app/views/catalog/_collection_count.html.erb +7 -0
  64. data/app/views/catalog/_collection_downloads.html.erb +17 -0
  65. data/app/views/catalog/_collection_online_contents.html.erb +17 -0
  66. data/app/views/catalog/_collection_overview.html.erb +7 -0
  67. data/app/views/catalog/_component_overview.html.erb +46 -0
  68. data/app/views/catalog/_context_card.html.erb +27 -0
  69. data/app/views/catalog/_context_sidebar.html.erb +8 -0
  70. data/app/views/catalog/_custom_metadata.html.erb +16 -0
  71. data/app/views/catalog/_home.html.erb +1 -0
  72. data/app/views/catalog/_index_breadcrumb_default.html.erb +3 -0
  73. data/app/views/catalog/_index_default.html.erb +17 -0
  74. data/app/views/catalog/_index_header.html.erb +7 -0
  75. data/app/views/catalog/_index_header_hierarchy_default.html.erb +42 -0
  76. data/app/views/catalog/_index_header_online_contents_default.html.erb +1 -0
  77. data/app/views/catalog/_index_hierarchy_default.html.erb +28 -0
  78. data/app/views/catalog/_index_online_contents_default.html.erb +6 -0
  79. data/app/views/catalog/_results_histogram.html.erb +10 -0
  80. data/app/views/catalog/_search_results.html.erb +31 -0
  81. data/app/views/catalog/_search_results_repository.html.erb +6 -0
  82. data/app/views/catalog/_search_within_form.html.erb +16 -0
  83. data/app/views/catalog/_show_breadcrumbs_default.html.erb +7 -0
  84. data/app/views/catalog/_show_collection.html.erb +40 -0
  85. data/app/views/catalog/_show_component_sidebar.html.erb +12 -0
  86. data/app/views/catalog/_show_default.html.erb +32 -0
  87. data/app/views/catalog/_show_header.html.erb +5 -0
  88. data/app/views/catalog/_show_sidebar.html.erb +30 -0
  89. data/app/views/catalog/index.html.erb +8 -0
  90. data/app/views/layouts/catalog_result.html.erb +7 -0
  91. data/app/views/shared/_breadcrumbs.html.erb +15 -0
  92. data/app/views/shared/_context_sidebar.html.erb +8 -0
  93. data/app/views/shared/_header_navbar.html.erb +54 -0
  94. data/app/views/shared/_main_menu_links.html.erb +6 -0
  95. data/arclight.gemspec +17 -4
  96. data/bin/rails +13 -0
  97. data/config/locales/arclight.en.yml +65 -0
  98. data/config/routes.rb +6 -0
  99. data/lib/arclight.rb +5 -0
  100. data/lib/arclight/custom_component.rb +98 -0
  101. data/lib/arclight/custom_document.rb +93 -0
  102. data/lib/arclight/digital_object.rb +26 -0
  103. data/lib/arclight/engine.rb +55 -0
  104. data/lib/arclight/exceptions.rb +18 -0
  105. data/lib/arclight/indexer.rb +9 -0
  106. data/lib/arclight/normalized_date.rb +45 -0
  107. data/lib/arclight/normalized_id.rb +25 -0
  108. data/lib/arclight/normalized_title.rb +30 -0
  109. data/lib/arclight/repository.rb +91 -0
  110. data/lib/arclight/shared_indexing_behavior.rb +97 -0
  111. data/lib/arclight/shared_terminology_behavior.rb +65 -0
  112. data/lib/arclight/solr_ead_indexer_ext.rb +159 -0
  113. data/lib/arclight/version.rb +3 -1
  114. data/lib/arclight/viewer.rb +45 -0
  115. data/lib/arclight/viewers/oembed.rb +56 -0
  116. data/lib/arclight/year_range.rb +102 -0
  117. data/lib/generators/arclight/install_generator.rb +63 -0
  118. data/lib/generators/arclight/templates/arclight.js +2 -0
  119. data/lib/generators/arclight/templates/arclight.scss +3 -0
  120. data/lib/generators/arclight/templates/catalog_controller.rb +347 -0
  121. data/lib/generators/arclight/templates/config/downloads.yml +13 -0
  122. data/lib/generators/arclight/templates/config/repositories.yml +42 -0
  123. data/lib/generators/arclight/update_generator.rb +22 -0
  124. data/lib/tasks/index.rake +87 -0
  125. data/package.json +24 -0
  126. data/solr/conf/_rest_managed.json +3 -0
  127. data/solr/conf/admin-extra.html +31 -0
  128. data/solr/conf/elevate.xml +36 -0
  129. data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  130. data/solr/conf/protwords.txt +21 -0
  131. data/solr/conf/schema.xml +631 -0
  132. data/solr/conf/scripts.conf +24 -0
  133. data/solr/conf/solrconfig.xml +393 -0
  134. data/solr/conf/spellings.txt +2 -0
  135. data/solr/conf/stopwords.txt +58 -0
  136. data/solr/conf/stopwords_en.txt +58 -0
  137. data/solr/conf/synonyms.txt +31 -0
  138. data/solr/conf/xslt/example.xsl +132 -0
  139. data/solr/conf/xslt/example_atom.xsl +67 -0
  140. data/solr/conf/xslt/example_rss.xsl +66 -0
  141. data/solr/conf/xslt/luke.xsl +337 -0
  142. data/tasks/arclight.rake +68 -0
  143. data/template.rb +15 -0
  144. data/vendor/assets/javascripts/responsiveTruncator.js +69 -0
  145. data/vendor/assets/javascripts/stickyfill.js +480 -0
  146. metadata +301 -6
@@ -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,393 @@
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">edismax</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&lt;-1 5&lt;-2 6&lt;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_tesim^100
89
+ text^10
90
+ </str>
91
+ <str name="pf">
92
+ title_tesim^100
93
+ text^10
94
+ </str>
95
+
96
+ <int name="ps">3</int>
97
+ <float name="tie">0.01</float>
98
+
99
+ <str name="fl">
100
+ id,
101
+ score,
102
+ abstract_ssm,
103
+ accessrestrict_ssm,
104
+ child_component_count_isim,
105
+ collection_ssm,
106
+ containers_ssim,
107
+ creator_ssm,
108
+ extent_ssm,
109
+ geogname_ssm,
110
+ has_online_content_ssim,
111
+ language_ssm,
112
+ level_ssm,
113
+ repository_ssm,
114
+ scopecontent_ssm,
115
+ title_ssm,
116
+ normalized_title_ssm,
117
+ normalized_date_ssm,
118
+ unitid_ssm,
119
+ parent_ssm,
120
+ parent_unittitles_ssm,
121
+ ead_ssi,
122
+ ref_ssm,
123
+ component_level_isim,
124
+ parent_access_restrict_ssm,
125
+ parent_access_terms_ssm,
126
+ names_coll_ssim
127
+ places_ssim
128
+ </str>
129
+
130
+ <str name="facet">true</str>
131
+ <str name="facet.mincount">1</str>
132
+ <str name="facet.field">level_sim</str>
133
+ <str name="facet.field">creator_sim</str>
134
+ <str name="facet.field">date_range_sim</str>
135
+ <str name="facet.field">names_sim</str>
136
+ <str name="facet.field">geogname_sim</str>
137
+ <str name="facet.field">access_subjects_sim</str>
138
+ <str name="facet.field">repository_sim</str>
139
+ <str name="facet.field">collection_sim</str>
140
+
141
+ <str name="spellcheck">true</str>
142
+ <str name="spellcheck.dictionary">default</str>
143
+ <str name="spellcheck.onlyMorePopular">true</str>
144
+ <str name="spellcheck.extendedResults">true</str>
145
+ <str name="spellcheck.collate">false</str>
146
+ <str name="spellcheck.count">5</str>
147
+ </lst>
148
+ <arr name="last-components">
149
+ <str>spellcheck</str>
150
+ </arr>
151
+ </requestHandler>
152
+
153
+ <!-- Field-based searches -->
154
+ <requestHandler name="name_search" class="solr.SearchHandler">
155
+ <lst name="defaults">
156
+ <str name="defType">edismax</str>
157
+ <str name="echoParams">explicit</str>
158
+ <int name="rows">10</int>
159
+ <str name="q.alt">*:*</str>
160
+ <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
161
+ <str name="df">name_tesim</str>
162
+ <str name="q.op">AND</str>
163
+
164
+ <str name="qf">
165
+ name_tesim
166
+ </str>
167
+ <str name="pf">
168
+ name_tesim
169
+ </str>
170
+
171
+ <str name="fl">*</str>
172
+ <str name="facet">true</str>
173
+ <str name="facet.mincount">1</str>
174
+ <str name="facet.field">level_sim</str>
175
+ <str name="facet.field">creator_sim</str>
176
+ <str name="facet.field">date_range_sim</str>
177
+ <str name="facet.field">names_sim</str>
178
+ <str name="facet.field">geogname_sim</str>
179
+ <str name="facet.field">access_subjects_sim</str>
180
+ <str name="facet.field">repository_sim</str>
181
+ </lst>
182
+ </requestHandler>
183
+
184
+ <requestHandler name="place_search" class="solr.SearchHandler">
185
+ <lst name="defaults">
186
+ <str name="defType">edismax</str>
187
+ <str name="echoParams">explicit</str>
188
+ <int name="rows">10</int>
189
+ <str name="q.alt">*:*</str>
190
+ <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
191
+ <str name="df">place_tesim</str>
192
+ <str name="q.op">AND</str>
193
+
194
+ <str name="qf">
195
+ place_tesim
196
+ </str>
197
+ <str name="pf">
198
+ place_tesim
199
+ </str>
200
+
201
+ <str name="fl">*</str>
202
+ <str name="facet">true</str>
203
+ <str name="facet.mincount">1</str>
204
+ <str name="facet.field">level_sim</str>
205
+ <str name="facet.field">creator_sim</str>
206
+ <str name="facet.field">date_range_sim</str>
207
+ <str name="facet.field">names_sim</str>
208
+ <str name="facet.field">geogname_sim</str>
209
+ <str name="facet.field">access_subjects_sim</str>
210
+ <str name="facet.field">repository_sim</str>
211
+ </lst>
212
+ </requestHandler>
213
+
214
+ <requestHandler name="subject_search" class="solr.SearchHandler">
215
+ <lst name="defaults">
216
+ <str name="defType">edismax</str>
217
+ <str name="echoParams">explicit</str>
218
+ <int name="rows">10</int>
219
+ <str name="q.alt">*:*</str>
220
+ <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
221
+ <str name="df">subject_tesim</str>
222
+ <str name="q.op">AND</str>
223
+
224
+ <str name="qf">
225
+ subject_tesim
226
+ </str>
227
+ <str name="pf">
228
+ subject_tesim
229
+ </str>
230
+
231
+ <str name="fl">*</str>
232
+ <str name="facet">true</str>
233
+ <str name="facet.mincount">1</str>
234
+ <str name="facet.field">level_sim</str>
235
+ <str name="facet.field">creator_sim</str>
236
+ <str name="facet.field">date_range_sim</str>
237
+ <str name="facet.field">names_sim</str>
238
+ <str name="facet.field">geogname_sim</str>
239
+ <str name="facet.field">access_subjects_sim</str>
240
+ <str name="facet.field">repository_sim</str>
241
+ </lst>
242
+ </requestHandler>
243
+
244
+ <requestHandler name="title_search" class="solr.SearchHandler">
245
+ <lst name="defaults">
246
+ <str name="defType">edismax</str>
247
+ <str name="echoParams">explicit</str>
248
+ <int name="rows">10</int>
249
+ <str name="q.alt">*:*</str>
250
+ <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
251
+ <str name="df">title_tesim</str>
252
+ <str name="q.op">AND</str>
253
+
254
+ <str name="qf">
255
+ title_tesim
256
+ </str>
257
+ <str name="pf">
258
+ title_tesim
259
+ </str>
260
+
261
+ <str name="fl">*</str>
262
+ <str name="facet">true</str>
263
+ <str name="facet.mincount">1</str>
264
+ <str name="facet.field">level_sim</str>
265
+ <str name="facet.field">creator_sim</str>
266
+ <str name="facet.field">date_range_sim</str>
267
+ <str name="facet.field">names_sim</str>
268
+ <str name="facet.field">geogname_sim</str>
269
+ <str name="facet.field">access_subjects_sim</str>
270
+ <str name="facet.field">repository_sim</str>
271
+ </lst>
272
+ </requestHandler>
273
+
274
+ <!-- for requests to get a single document; use id=666 instead of q=id:666 -->
275
+ <requestHandler name="document" class="solr.SearchHandler" >
276
+ <lst name="defaults">
277
+ <str name="echoParams">all</str>
278
+ <str name="fl">*</str>
279
+ <str name="rows">1</str>
280
+ <str name="q">{!term f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
281
+ </lst>
282
+ </requestHandler>
283
+
284
+ <!-- Spell Check
285
+
286
+ The spell check component can return a list of alternative spelling
287
+ suggestions.
288
+
289
+ http://wiki.apache.org/solr/SpellCheckComponent
290
+ -->
291
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
292
+
293
+ <str name="queryAnalyzerFieldType">textSpell</str>
294
+
295
+ <!-- Multiple "Spell Checkers" can be declared and used by this
296
+ component
297
+ -->
298
+
299
+ <!-- a spellchecker built from a field of the main index, and
300
+ written to disk
301
+ -->
302
+ <lst name="spellchecker">
303
+ <str name="name">default</str>
304
+ <str name="field">spell</str>
305
+ <str name="spellcheckIndexDir">./spell</str>
306
+ <str name="buildOnOptimize">true</str>
307
+ </lst>
308
+ <lst name="spellchecker">
309
+ <str name="name">author</str>
310
+ <str name="field">author_spell</str>
311
+ <str name="spellcheckIndexDir">./spell_author</str>
312
+ <str name="accuracy">0.7</str>
313
+ <str name="buildOnOptimize">true</str>
314
+ </lst>
315
+ <lst name="spellchecker">
316
+ <str name="name">subject</str>
317
+ <str name="field">subject_spell</str>
318
+ <str name="spellcheckIndexDir">./spell_subject</str>
319
+ <str name="accuracy">0.7</str>
320
+ <str name="buildOnOptimize">true</str>
321
+ </lst>
322
+ <lst name="spellchecker">
323
+ <str name="name">title</str>
324
+ <str name="field">title_spell</str>
325
+ <str name="spellcheckIndexDir">./spell_title</str>
326
+ <str name="accuracy">0.7</str>
327
+ <str name="buildOnOptimize">true</str>
328
+ </lst>
329
+
330
+ <!-- a spellchecker that uses a different distance measure -->
331
+ <!--
332
+ <lst name="spellchecker">
333
+ <str name="name">jarowinkler</str>
334
+ <str name="field">spell</str>
335
+ <str name="distanceMeasure">
336
+ org.apache.lucene.search.spell.JaroWinklerDistance
337
+ </str>
338
+ <str name="spellcheckIndexDir">spellcheckerJaro</str>
339
+ </lst>
340
+ -->
341
+
342
+ <!-- a spellchecker that use an alternate comparator
343
+
344
+ comparatorClass be one of:
345
+ 1. score (default)
346
+ 2. freq (Frequency first, then score)
347
+ 3. A fully qualified class name
348
+ -->
349
+ <!--
350
+ <lst name="spellchecker">
351
+ <str name="name">freq</str>
352
+ <str name="field">lowerfilt</str>
353
+ <str name="spellcheckIndexDir">spellcheckerFreq</str>
354
+ <str name="comparatorClass">freq</str>
355
+ <str name="buildOnCommit">true</str>
356
+ -->
357
+
358
+ <!-- A spellchecker that reads the list of words from a file -->
359
+ <!--
360
+ <lst name="spellchecker">
361
+ <str name="classname">solr.FileBasedSpellChecker</str>
362
+ <str name="name">file</str>
363
+ <str name="sourceLocation">spellings.txt</str>
364
+ <str name="characterEncoding">UTF-8</str>
365
+ <str name="spellcheckIndexDir">spellcheckerFile</str>
366
+ </lst>
367
+ -->
368
+ </searchComponent>
369
+
370
+ <searchComponent name="suggest" class="solr.SuggestComponent">
371
+ <lst name="suggester">
372
+ <str name="name">mySuggester</str>
373
+ <str name="lookupImpl">AnalyzingInfixLookupFactory</str>
374
+ <str name="indexPath">suggester_infix_dir</str>
375
+ <str name="highlight">false</str>
376
+ <str name="suggestAnalyzerFieldType">text</str>
377
+ <str name="buildOnCommit">true</str>
378
+ <str name="field">suggest</str>
379
+ </lst>
380
+ </searchComponent>
381
+
382
+ <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
383
+ <lst name="defaults">
384
+ <str name="suggest">true</str>
385
+ <str name="suggest.count">5</str>
386
+ <str name="suggest.dictionary">mySuggester</str>
387
+ </lst>
388
+ <arr name="components">
389
+ <str>suggest</str>
390
+ </arr>
391
+ </requestHandler>
392
+
393
+ </config>
@@ -0,0 +1,2 @@
1
+ pizza
2
+ history
@@ -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
+