supplejack_api 1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (291) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +80 -0
  3. data/Rakefile +42 -0
  4. data/app/assets/javascripts/supplejack_api/application.js +26 -0
  5. data/app/assets/stylesheets/supplejack_api/application.css +30 -0
  6. data/app/controllers/supplejack_api/admin/base_controller.rb +24 -0
  7. data/app/controllers/supplejack_api/admin/sessions_controller.rb +25 -0
  8. data/app/controllers/supplejack_api/admin/site_activities_controller.rb +21 -0
  9. data/app/controllers/supplejack_api/admin/users_controller.rb +55 -0
  10. data/app/controllers/supplejack_api/application_controller.rb +70 -0
  11. data/app/controllers/supplejack_api/concepts_controller.rb +52 -0
  12. data/app/controllers/supplejack_api/concerns/ignore_metrics.rb +14 -0
  13. data/app/controllers/supplejack_api/concerns/records_controller_metrics.rb +26 -0
  14. data/app/controllers/supplejack_api/concerns/set_items_controller_metrics.rb +20 -0
  15. data/app/controllers/supplejack_api/concerns/user_sets_controller_metrics.rb +26 -0
  16. data/app/controllers/supplejack_api/harvester/concepts_controller.rb +41 -0
  17. data/app/controllers/supplejack_api/harvester/fragments_controller.rb +30 -0
  18. data/app/controllers/supplejack_api/harvester/records_controller.rb +68 -0
  19. data/app/controllers/supplejack_api/metrics_api_controller.rb +44 -0
  20. data/app/controllers/supplejack_api/partners_controller.rb +39 -0
  21. data/app/controllers/supplejack_api/records_controller.rb +71 -0
  22. data/app/controllers/supplejack_api/schema_controller.rb +19 -0
  23. data/app/controllers/supplejack_api/set_items_controller.rb +38 -0
  24. data/app/controllers/supplejack_api/sources_controller.rb +67 -0
  25. data/app/controllers/supplejack_api/status_controller.rb +67 -0
  26. data/app/controllers/supplejack_api/user_sets_controller.rb +97 -0
  27. data/app/controllers/supplejack_api/users_controller.rb +49 -0
  28. data/app/helpers/supplejack_api/application_helper.rb +39 -0
  29. data/app/helpers/supplejack_api/facets_helper.rb +30 -0
  30. data/app/mailers/supplejack_api/request_limit_mailer.rb +43 -0
  31. data/app/models/supplejack_api/api_concept/concept_fragment.rb +31 -0
  32. data/app/models/supplejack_api/api_record/record_fragment.rb +15 -0
  33. data/app/models/supplejack_api/concept.rb +46 -0
  34. data/app/models/supplejack_api/concept_search.rb +86 -0
  35. data/app/models/supplejack_api/concerns/queryable_by_date.rb +31 -0
  36. data/app/models/supplejack_api/concerns/record.rb +108 -0
  37. data/app/models/supplejack_api/concerns/record_fragmentable.rb +24 -0
  38. data/app/models/supplejack_api/concerns/searchable.rb +430 -0
  39. data/app/models/supplejack_api/concerns/user_set.rb +219 -0
  40. data/app/models/supplejack_api/daily_metrics.rb +20 -0
  41. data/app/models/supplejack_api/faceted_metrics.rb +55 -0
  42. data/app/models/supplejack_api/fragment.rb +82 -0
  43. data/app/models/supplejack_api/interaction_models/record.rb +60 -0
  44. data/app/models/supplejack_api/interaction_models/set.rb +13 -0
  45. data/app/models/supplejack_api/interaction_updaters/all_usage_metric.rb +41 -0
  46. data/app/models/supplejack_api/interaction_updaters/set_metrics.rb +32 -0
  47. data/app/models/supplejack_api/interaction_updaters/usage_metrics.rb +73 -0
  48. data/app/models/supplejack_api/partner.rb +24 -0
  49. data/app/models/supplejack_api/preview_record.rb +30 -0
  50. data/app/models/supplejack_api/record.rb +18 -0
  51. data/app/models/supplejack_api/record_search.rb +12 -0
  52. data/app/models/supplejack_api/schema_definition.rb +147 -0
  53. data/app/models/supplejack_api/search.rb +14 -0
  54. data/app/models/supplejack_api/set_item.rb +57 -0
  55. data/app/models/supplejack_api/site_activity.rb +59 -0
  56. data/app/models/supplejack_api/source.rb +28 -0
  57. data/app/models/supplejack_api/source_activity.rb +36 -0
  58. data/app/models/supplejack_api/source_authority.rb +42 -0
  59. data/app/models/supplejack_api/supplejack_schema.rb +37 -0
  60. data/app/models/supplejack_api/support/concept/searchable.rb +79 -0
  61. data/app/models/supplejack_api/support/concept/storable.rb +59 -0
  62. data/app/models/supplejack_api/support/fragment_helpers.rb +96 -0
  63. data/app/models/supplejack_api/support/harvestable.rb +105 -0
  64. data/app/models/supplejack_api/support/searchable.rb +115 -0
  65. data/app/models/supplejack_api/support/status_logger.rb +23 -0
  66. data/app/models/supplejack_api/support/storable.rb +49 -0
  67. data/app/models/supplejack_api/support/validation_logger.rb +23 -0
  68. data/app/models/supplejack_api/usage_metrics.rb +25 -0
  69. data/app/models/supplejack_api/user.rb +211 -0
  70. data/app/models/supplejack_api/user_activity.rb +65 -0
  71. data/app/models/supplejack_api/user_set.rb +17 -0
  72. data/app/serializers/supplejack_api/application_serializer.rb +12 -0
  73. data/app/serializers/supplejack_api/concept_record_serializer.rb +23 -0
  74. data/app/serializers/supplejack_api/concept_search_serializer.rb +12 -0
  75. data/app/serializers/supplejack_api/concept_serializer.rb +100 -0
  76. data/app/serializers/supplejack_api/concerns/record_serializable.rb +119 -0
  77. data/app/serializers/supplejack_api/concerns/search_serializable.rb +24 -0
  78. data/app/serializers/supplejack_api/record_search_serializer.rb +64 -0
  79. data/app/serializers/supplejack_api/record_serializer.rb +13 -0
  80. data/app/serializers/supplejack_api/search_serializer.rb +13 -0
  81. data/app/serializers/supplejack_api/source_authority_serializer.rb +23 -0
  82. data/app/serializers/supplejack_api/user_serializer.rb +13 -0
  83. data/app/serializers/supplejack_api/user_set_record_serializer.rb +14 -0
  84. data/app/serializers/supplejack_api/user_set_serializer.rb +77 -0
  85. data/app/services/metrics_api/v3/api.rb +30 -0
  86. data/app/services/metrics_api/v3/endpoints/facets.rb +23 -0
  87. data/app/services/metrics_api/v3/endpoints/global.rb +26 -0
  88. data/app/services/metrics_api/v3/endpoints/helpers.rb +14 -0
  89. data/app/services/metrics_api/v3/endpoints/root.rb +97 -0
  90. data/app/services/metrics_api/v3/presenters/daily_metric.rb +23 -0
  91. data/app/services/metrics_api/v3/presenters/extended_metadata.rb +41 -0
  92. data/app/services/metrics_api/v3/presenters/record.rb +26 -0
  93. data/app/services/metrics_api/v3/presenters/view.rb +28 -0
  94. data/app/views/layouts/supplejack_api/_head.html.erb +17 -0
  95. data/app/views/layouts/supplejack_api/_top_nav.html.erb +33 -0
  96. data/app/views/layouts/supplejack_api/application.html.erb +33 -0
  97. data/app/views/supplejack_api/admin/sessions/new.html.erb +25 -0
  98. data/app/views/supplejack_api/admin/shared/_links.erb +34 -0
  99. data/app/views/supplejack_api/admin/site_activities/index.csv.erb +22 -0
  100. data/app/views/supplejack_api/admin/site_activities/index.html.erb +54 -0
  101. data/app/views/supplejack_api/admin/users/edit.html.erb +16 -0
  102. data/app/views/supplejack_api/admin/users/index.csv.erb +22 -0
  103. data/app/views/supplejack_api/admin/users/index.html.erb +57 -0
  104. data/app/views/supplejack_api/admin/users/show.html.erb +33 -0
  105. data/app/views/supplejack_api/request_limit_mailer/at100percent.text.erb +13 -0
  106. data/app/views/supplejack_api/request_limit_mailer/at100percent_admin.text.erb +1 -0
  107. data/app/views/supplejack_api/request_limit_mailer/at90percent.text.erb +13 -0
  108. data/app/views/supplejack_api/request_limit_mailer/at90percent_admin.text.erb +1 -0
  109. data/app/workers/supplejack_api/daily_metrics_worker.rb +112 -0
  110. data/app/workers/supplejack_api/interaction_metrics_worker.rb +45 -0
  111. data/config/cucumber.yml +16 -0
  112. data/config/initializers/force_eagerload.rb +11 -0
  113. data/config/initializers/interaction_updaters.rb +7 -0
  114. data/config/routes.rb +81 -0
  115. data/db/binding_records.development.json +7 -0
  116. data/db/binding_records.staging.json +7 -0
  117. data/db/concepts.json +33 -0
  118. data/db/concepts_data.json +569745 -0
  119. data/db/source_authorities.json +119 -0
  120. data/lib/generators/supplejack_api/install_generator.rb +124 -0
  121. data/lib/mongoid/paperclip.rb +53 -0
  122. data/lib/mongoid/string.rb +20 -0
  123. data/lib/sunspot/mongoid.rb +51 -0
  124. data/lib/sunspot/resque_session_proxy.rb +72 -0
  125. data/lib/sunspot/sunspot_spellcheck.rb +98 -0
  126. data/lib/supplejack_api.rb +13 -0
  127. data/lib/supplejack_api/admin/sortable.rb +40 -0
  128. data/lib/supplejack_api/engine.rb +46 -0
  129. data/lib/supplejack_api/harvester_constraint.rb +28 -0
  130. data/lib/supplejack_api/stylesheets.rb +36 -0
  131. data/lib/supplejack_api/utils.rb +75 -0
  132. data/lib/supplejack_api/version.rb +11 -0
  133. data/lib/tasks/resque.rake +22 -0
  134. data/lib/url_validator.rb +38 -0
  135. data/spec/controllers/supplejack_api/admin/base_controller_spec.rb +55 -0
  136. data/spec/controllers/supplejack_api/admin/site_activities_controller_spec.rb +43 -0
  137. data/spec/controllers/supplejack_api/admin/users_controller_spec.rb +79 -0
  138. data/spec/controllers/supplejack_api/application_controller_spec.rb +133 -0
  139. data/spec/controllers/supplejack_api/concepts_controller_spec.rb +83 -0
  140. data/spec/controllers/supplejack_api/concerns/records_controller_metrics_spec.rb +60 -0
  141. data/spec/controllers/supplejack_api/harvester/concepts_controller_spec.rb +57 -0
  142. data/spec/controllers/supplejack_api/harvester/records_controller_spec.rb +138 -0
  143. data/spec/controllers/supplejack_api/metrics_api_controller_spec.rb +71 -0
  144. data/spec/controllers/supplejack_api/partners_controller_spec.rb +77 -0
  145. data/spec/controllers/supplejack_api/records_controller_spec.rb +143 -0
  146. data/spec/controllers/supplejack_api/set_items_controller_spec.rb +78 -0
  147. data/spec/controllers/supplejack_api/sources_controller_spec.rb +161 -0
  148. data/spec/controllers/supplejack_api/status_controller_spec.rb +120 -0
  149. data/spec/controllers/supplejack_api/user_sets_controller_spec.rb +233 -0
  150. data/spec/controllers/supplejack_api/users_controller_spec.rb +61 -0
  151. data/spec/dummy/README.rdoc +268 -0
  152. data/spec/dummy/Rakefile +7 -0
  153. data/spec/dummy/app/assets/javascripts/application.js +23 -0
  154. data/spec/dummy/app/assets/stylesheets/application.css +22 -0
  155. data/spec/dummy/app/controllers/application_controller.rb +10 -0
  156. data/spec/dummy/app/helpers/application_helper.rb +9 -0
  157. data/spec/dummy/app/supplejack_api/concept_schema.rb +83 -0
  158. data/spec/dummy/app/supplejack_api/record_schema.rb +64 -0
  159. data/spec/dummy/app/supplejack_api/record_schema.txt +66 -0
  160. data/spec/dummy/app/views/layouts/application.html.erb +23 -0
  161. data/spec/dummy/app/workers/supplejack_api/clear_index_buffer.rb +32 -0
  162. data/spec/dummy/app/workers/supplejack_api/flush_old_records_worker.rb +17 -0
  163. data/spec/dummy/app/workers/supplejack_api/index_buffer.rb +49 -0
  164. data/spec/dummy/app/workers/supplejack_api/index_source_worker.rb +39 -0
  165. data/spec/dummy/app/workers/supplejack_api/index_worker.rb +82 -0
  166. data/spec/dummy/app/workers/supplejack_api/store_user_activity_worker.rb +24 -0
  167. data/spec/dummy/config.ru +11 -0
  168. data/spec/dummy/config/application.rb +76 -0
  169. data/spec/dummy/config/application.yml +31 -0
  170. data/spec/dummy/config/application.yml.example +36 -0
  171. data/spec/dummy/config/boot.rb +17 -0
  172. data/spec/dummy/config/environment.rb +12 -0
  173. data/spec/dummy/config/environments/development.rb +42 -0
  174. data/spec/dummy/config/environments/production.rb +76 -0
  175. data/spec/dummy/config/environments/test.rb +46 -0
  176. data/spec/dummy/config/initializers/backtrace_silencers.rb +14 -0
  177. data/spec/dummy/config/initializers/devise.rb +214 -0
  178. data/spec/dummy/config/initializers/inflections.rb +22 -0
  179. data/spec/dummy/config/initializers/kaminari_config.rb +17 -0
  180. data/spec/dummy/config/initializers/mime_types.rb +12 -0
  181. data/spec/dummy/config/initializers/mongoid.rb +9 -0
  182. data/spec/dummy/config/initializers/quiet_logger.rb +23 -0
  183. data/spec/dummy/config/initializers/resque.rb +18 -0
  184. data/spec/dummy/config/initializers/secret_token.rb +14 -0
  185. data/spec/dummy/config/initializers/session_store.rb +15 -0
  186. data/spec/dummy/config/initializers/simple_form.rb +149 -0
  187. data/spec/dummy/config/initializers/simple_form_foundation.rb +33 -0
  188. data/spec/dummy/config/initializers/state_machine.rb +8 -0
  189. data/spec/dummy/config/initializers/sunspot.rb +32 -0
  190. data/spec/dummy/config/initializers/wrap_parameters.rb +17 -0
  191. data/spec/dummy/config/locales/devise.en.yml +63 -0
  192. data/spec/dummy/config/locales/en.yml +66 -0
  193. data/spec/dummy/config/locales/simple_form.en.yml +33 -0
  194. data/spec/dummy/config/mongoid.travis.yml +34 -0
  195. data/spec/dummy/config/mongoid.yml +36 -0
  196. data/spec/dummy/config/resque-pool.yml +18 -0
  197. data/spec/dummy/config/resque_schedule.yml +12 -0
  198. data/spec/dummy/config/routes.rb +11 -0
  199. data/spec/dummy/config/secrets.yml +8 -0
  200. data/spec/dummy/config/sunspot.yml +38 -0
  201. data/spec/dummy/db/concepts.json +37 -0
  202. data/spec/dummy/db/source_authorities.json +116 -0
  203. data/spec/dummy/public/404.html +35 -0
  204. data/spec/dummy/public/422.html +35 -0
  205. data/spec/dummy/public/500.html +34 -0
  206. data/spec/dummy/public/favicon.ico +8 -0
  207. data/spec/dummy/script/rails +6 -0
  208. data/spec/dummy/solr/collection1/conf/elevate.xml +36 -0
  209. data/spec/dummy/solr/collection1/conf/mapping-FoldToASCII.txt +3813 -0
  210. data/spec/dummy/solr/collection1/conf/schema.xml +292 -0
  211. data/spec/dummy/solr/collection1/conf/solrconfig.xml +1780 -0
  212. data/spec/dummy/solr/collection1/conf/spellings.txt +2 -0
  213. data/spec/dummy/solr/collection1/conf/stopwords.txt +58 -0
  214. data/spec/dummy/solr/collection1/conf/synonyms.txt +31 -0
  215. data/spec/factories/concepts.rb +16 -0
  216. data/spec/factories/daily_metrics.rb +10 -0
  217. data/spec/factories/faceted_metrics.rb +25 -0
  218. data/spec/factories/fragment.rb +14 -0
  219. data/spec/factories/partners.rb +14 -0
  220. data/spec/factories/record_interaction.rb +17 -0
  221. data/spec/factories/records.rb +47 -0
  222. data/spec/factories/set_interaction.rb +15 -0
  223. data/spec/factories/source_authorities.rb +19 -0
  224. data/spec/factories/sources.rb +16 -0
  225. data/spec/factories/usage_metrics.rb +20 -0
  226. data/spec/factories/user_activities.rb +14 -0
  227. data/spec/factories/user_sets.rb +27 -0
  228. data/spec/factories/users.rb +23 -0
  229. data/spec/helpers/application_helper_spec.rb +35 -0
  230. data/spec/models/concept_spec.rb +163 -0
  231. data/spec/models/fragment_spec.rb +15 -0
  232. data/spec/models/site_activity_spec.rb +103 -0
  233. data/spec/models/source_activity_spec.rb +56 -0
  234. data/spec/models/source_authority_spec.rb +42 -0
  235. data/spec/models/supplejack_api/api_concept/concept_fragment_spec.rb +189 -0
  236. data/spec/models/supplejack_api/api_record/record_fragment_spec.rb +189 -0
  237. data/spec/models/supplejack_api/concept_spec.rb +0 -0
  238. data/spec/models/supplejack_api/interaction_updaters/all_usage_metric_spec.rb +41 -0
  239. data/spec/models/supplejack_api/interaction_updaters/set_metrics_spec.rb +32 -0
  240. data/spec/models/supplejack_api/interaction_updaters/usage_metrics_spec.rb +44 -0
  241. data/spec/models/supplejack_api/partner_spec.rb +20 -0
  242. data/spec/models/supplejack_api/record_search_spec.rb +429 -0
  243. data/spec/models/supplejack_api/record_spec.rb +280 -0
  244. data/spec/models/supplejack_api/schema_definition_spec.rb +272 -0
  245. data/spec/models/supplejack_api/search_spec.rb +243 -0
  246. data/spec/models/supplejack_api/set_item_spec.rb +123 -0
  247. data/spec/models/supplejack_api/source_spec.rb +22 -0
  248. data/spec/models/supplejack_api/support/fragment_helpers_spec.rb +216 -0
  249. data/spec/models/supplejack_api/support/harvestable_spec.rb +177 -0
  250. data/spec/models/supplejack_api/support/searchable_spec.rb +85 -0
  251. data/spec/models/supplejack_api/support/storable_spec.rb +18 -0
  252. data/spec/models/supplejack_api/user_activity_spec.rb +88 -0
  253. data/spec/models/supplejack_api/user_set_spec.rb +559 -0
  254. data/spec/models/supplejack_api/user_spec.rb +348 -0
  255. data/spec/routing/concepts_routing_spec.rb +22 -0
  256. data/spec/routing/harvester_constraint_spec.rb +66 -0
  257. data/spec/routing/harvester_routing_spec.rb +51 -0
  258. data/spec/routing/partner_routing_spec.rb +34 -0
  259. data/spec/routing/records_routing_spec.rb +26 -0
  260. data/spec/routing/sets_routing_spec.rb +44 -0
  261. data/spec/routing/source_routing_spec.rb +38 -0
  262. data/spec/routing/users_routing_spec.rb +18 -0
  263. data/spec/serializers/concept_record_serializer_spec.rb +30 -0
  264. data/spec/serializers/supplejack_api/application_serializer_spec.rb +14 -0
  265. data/spec/serializers/supplejack_api/concept_search_serializer_spec.rb +34 -0
  266. data/spec/serializers/supplejack_api/concept_serializer_spec.rb +92 -0
  267. data/spec/serializers/supplejack_api/record_search_serializer_spec.rb +34 -0
  268. data/spec/serializers/supplejack_api/record_serializer_spec.rb +271 -0
  269. data/spec/serializers/supplejack_api/search_serializer_spec.rb +90 -0
  270. data/spec/serializers/supplejack_api/user_serializer_spec.rb +22 -0
  271. data/spec/serializers/supplejack_api/user_set_serializer_spec.rb +96 -0
  272. data/spec/services/metrics_api/v3/api_spec.rb +23 -0
  273. data/spec/services/metrics_api/v3/endpoints/facets_spec.rb +25 -0
  274. data/spec/services/metrics_api/v3/endpoints/global_spec.rb +22 -0
  275. data/spec/services/metrics_api/v3/endpoints/root_spec.rb +49 -0
  276. data/spec/services/metrics_api/v3/presenters/extended_metadata_spec.rb +49 -0
  277. data/spec/spec_helper.rb +70 -0
  278. data/spec/support/api/schemas/metrics/daily_metrics_metadata.json +24 -0
  279. data/spec/support/api/schemas/metrics/extended_metrics.json +26 -0
  280. data/spec/support/api/schemas/metrics/extended_response.json +6 -0
  281. data/spec/support/api/schemas/metrics/facets_response.json +6 -0
  282. data/spec/support/api/schemas/metrics/record_metadata.json +33 -0
  283. data/spec/support/api/schemas/metrics/top_level_response.json +6 -0
  284. data/spec/support/api/schemas/metrics/view_metadata.json +33 -0
  285. data/spec/support/api_schema_matcher.rb +14 -0
  286. data/spec/support/devise.rb +10 -0
  287. data/spec/workers/supplejack_api/daily_metrics_worker_spec.rb +140 -0
  288. data/spec/workers/supplejack_api/flush_old_records_worker_spec.rb +20 -0
  289. data/spec/workers/supplejack_api/index_worker_spec.rb +52 -0
  290. data/spec/workers/supplejack_api/source_index_worker_spec.rb +61 -0
  291. metadata +1231 -0
@@ -0,0 +1,292 @@
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
+ This is the Solr schema file. This file should be named "schema.xml" and
20
+ should be in the conf directory under the solr home
21
+ (i.e. ./solr/conf/schema.xml by default)
22
+ or located where the classloader for the Solr webapp can find it.
23
+
24
+ This example schema is the recommended starting point for users.
25
+ It should be kept correct and concise, usable out-of-the-box.
26
+
27
+ For more information, on how to customize this file, please see
28
+ http://wiki.apache.org/solr/SchemaXml
29
+
30
+ PERFORMANCE NOTE: this schema includes many optional features and should not
31
+ be used for benchmarking. To improve performance one could
32
+ - set stored="false" for all fields possible (esp large fields) when you
33
+ only need to search on the field but don't need to return the original
34
+ value.
35
+ - set indexed="false" if you don't need to search on the field, but only
36
+ return the field as a result of searching on other indexed fields.
37
+ - remove all unneeded copyField statements
38
+ - for best index size and searching performance, set "index" to false
39
+ for all general text fields, use copyField to copy them to the
40
+ catchall "text" field, and use that for searching.
41
+ - For maximum indexing performance, use the StreamingUpdateSolrServer
42
+ java client.
43
+ - Remember to run the JVM in server mode, and use a higher logging level
44
+ that avoids logging every request
45
+ -->
46
+ <schema name="sunspot" version="1.5">
47
+ <types>
48
+ <!-- field type definitions. The "name" attribute is
49
+ just a label to be used by field definitions. The "class"
50
+ attribute and any other attributes determine the real
51
+ behavior of the fieldType.
52
+ Class names starting with "solr" refer to java classes in the
53
+ org.apache.solr.analysis package.
54
+ -->
55
+ <!-- *** This fieldType is used by Sunspot! *** -->
56
+ <fieldType name="string" class="solr.StrField" omitNorms="true"/>
57
+ <!-- *** This fieldType is used by Sunspot! *** -->
58
+ <fieldType name="tdouble" class="solr.TrieDoubleField" omitNorms="true"/>
59
+ <!-- *** This fieldType is used by Sunspot! *** -->
60
+ <fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
61
+ <!-- *** This fieldType is used by Sunspot! *** -->
62
+ <fieldType name="text" class="solr.TextField" omitNorms="false">
63
+ <analyzer type="index">
64
+ <tokenizer class="solr.StandardTokenizerFactory"/>
65
+ <filter class="solr.StandardFilterFactory"/>
66
+ <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
67
+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" />
68
+ <filter class="solr.LowerCaseFilterFactory" />
69
+ <filter class="solr.KStemFilterFactory" protected="protwords.txt" />
70
+ <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-FoldToASCII.txt" />
71
+ </analyzer>
72
+ <analyzer type="query">
73
+ <tokenizer class="solr.StandardTokenizerFactory"/>
74
+ <filter class="solr.StandardFilterFactory"/>
75
+ <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
76
+ <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" />
77
+ <filter class="solr.LowerCaseFilterFactory" />
78
+ <filter class="solr.KStemFilterFactory" protected="protwords.txt" />
79
+ <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-FoldToASCII.txt" />
80
+ </analyzer>
81
+ </fieldType>
82
+ <!-- *** This fieldType is used by Sunspot! *** -->
83
+ <fieldType name="boolean" class="solr.BoolField" omitNorms="true"/>
84
+ <!-- *** This fieldType is used by Sunspot! *** -->
85
+ <fieldType name="date" class="solr.DateField" omitNorms="true"/>
86
+ <!-- *** This fieldType is used by Sunspot! *** -->
87
+ <fieldType name="sdouble" class="solr.SortableDoubleField" omitNorms="true"/>
88
+ <!-- *** This fieldType is used by Sunspot! *** -->
89
+ <fieldType name="sfloat" class="solr.SortableFloatField" omitNorms="true"/>
90
+ <!-- *** This fieldType is used by Sunspot! *** -->
91
+ <fieldType name="sint" class="solr.SortableIntField" omitNorms="true"/>
92
+ <!-- *** This fieldType is used by Sunspot! *** -->
93
+ <fieldType name="slong" class="solr.SortableLongField" omitNorms="true"/>
94
+ <!-- *** This fieldType is used by Sunspot! *** -->
95
+ <fieldType name="tint" class="solr.TrieIntField" omitNorms="true"/>
96
+ <!-- *** This fieldType is used by Sunspot! *** -->
97
+ <fieldType name="tfloat" class="solr.TrieFloatField" omitNorms="true"/>
98
+ <!-- *** This fieldType is used by Sunspot! *** -->
99
+ <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true"/>
100
+
101
+ <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
102
+ <!--<fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/> -->
103
+
104
+ <fieldType name="location" class="solr.SpatialRecursivePrefixTreeFieldType" maxDistErr="0.000009" units="degrees" />
105
+
106
+ <!--
107
+ Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
108
+ -->
109
+ <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
110
+ <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
111
+ <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
112
+ <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
113
+ </types>
114
+ <fields>
115
+ <!-- Valid attributes for fields:
116
+ name: mandatory - the name for the field
117
+ type: mandatory - the name of a previously defined type from the
118
+ <types> section
119
+ indexed: true if this field should be indexed (searchable or sortable)
120
+ stored: true if this field should be retrievable
121
+ compressed: [false] if this field should be stored using gzip compression
122
+ (this will only apply if the field type is compressable; among
123
+ the standard field types, only TextField and StrField are)
124
+ multiValued: true if this field may contain multiple values per document
125
+ omitNorms: (expert) set to true to omit the norms associated with
126
+ this field (this disables length normalization and index-time
127
+ boosting for the field, and saves some memory). Only full-text
128
+ fields or fields that need an index-time boost need norms.
129
+ termVectors: [false] set to true to store the term vector for a
130
+ given field.
131
+ When using MoreLikeThis, fields used for similarity should be
132
+ stored for best performance.
133
+ termPositions: Store position information with the term vector.
134
+ This will increase storage costs.
135
+ termOffsets: Store offset information with the term vector. This
136
+ will increase storage costs.
137
+ required: The field is required. It will throw an error if the
138
+ value does not exist
139
+ default: a value that should be used if no value is specified
140
+ when adding a document.
141
+ -->
142
+
143
+ <field name="_version_" type="long" indexed="true" stored="true"/>
144
+
145
+ <!-- *** This field is used by Sunspot! *** -->
146
+ <field name="id" stored="true" type="string" multiValued="false" indexed="true"/>
147
+ <!-- *** This field is used by Sunspot! *** -->
148
+ <field name="type" stored="false" type="string" multiValued="true" indexed="true"/>
149
+ <!-- *** This field is used by Sunspot! *** -->
150
+ <field name="class_name" stored="false" type="string" multiValued="false" indexed="true"/>
151
+ <!-- *** This field is used by Sunspot! *** -->
152
+ <field name="text" stored="false" type="text" multiValued="true" indexed="true"/>
153
+ <!-- *** This field is used by Sunspot! *** -->
154
+ <field name="lat" stored="true" type="tdouble" multiValued="false" indexed="true"/>
155
+ <!-- *** This field is used by Sunspot! *** -->
156
+ <field name="lng" stored="true" type="tdouble" multiValued="false" indexed="true"/>
157
+ <!-- *** This dynamicField is used by Sunspot! *** -->
158
+ <dynamicField name="random_*" stored="false" type="rand" multiValued="false" indexed="true"/>
159
+ <!-- *** This dynamicField is used by Sunspot! *** -->
160
+ <dynamicField name="_local*" stored="false" type="tdouble" multiValued="false" indexed="true"/>
161
+ <!-- *** This dynamicField is used by Sunspot! *** -->
162
+ <dynamicField name="*_text" stored="false" type="text" multiValued="true" indexed="true"/>
163
+ <!-- *** This dynamicField is used by Sunspot! *** -->
164
+ <dynamicField name="*_texts" stored="true" type="text" multiValued="true" indexed="true"/>
165
+ <!-- *** This dynamicField is used by Sunspot! *** -->
166
+ <dynamicField name="*_b" stored="false" type="boolean" multiValued="false" indexed="true"/>
167
+ <!-- *** This dynamicField is used by Sunspot! *** -->
168
+ <dynamicField name="*_bm" stored="false" type="boolean" multiValued="true" indexed="true"/>
169
+ <!-- *** This dynamicField is used by Sunspot! *** -->
170
+ <dynamicField name="*_bs" stored="true" type="boolean" multiValued="false" indexed="true"/>
171
+ <!-- *** This dynamicField is used by Sunspot! *** -->
172
+ <dynamicField name="*_bms" stored="true" type="boolean" multiValued="true" indexed="true"/>
173
+ <!-- *** This dynamicField is used by Sunspot! *** -->
174
+ <dynamicField name="*_d" stored="false" type="date" multiValued="false" indexed="true"/>
175
+ <!-- *** This dynamicField is used by Sunspot! *** -->
176
+ <dynamicField name="*_dm" stored="false" type="date" multiValued="true" indexed="true"/>
177
+ <!-- *** This dynamicField is used by Sunspot! *** -->
178
+ <dynamicField name="*_ds" stored="true" type="date" multiValued="false" indexed="true"/>
179
+ <!-- *** This dynamicField is used by Sunspot! *** -->
180
+ <dynamicField name="*_dms" stored="true" type="date" multiValued="true" indexed="true"/>
181
+ <!-- *** This dynamicField is used by Sunspot! *** -->
182
+ <dynamicField name="*_e" stored="false" type="sdouble" multiValued="false" indexed="true"/>
183
+ <!-- *** This dynamicField is used by Sunspot! *** -->
184
+ <dynamicField name="*_em" stored="false" type="sdouble" multiValued="true" indexed="true"/>
185
+ <!-- *** This dynamicField is used by Sunspot! *** -->
186
+ <dynamicField name="*_es" stored="true" type="sdouble" multiValued="false" indexed="true"/>
187
+ <!-- *** This dynamicField is used by Sunspot! *** -->
188
+ <dynamicField name="*_ems" stored="true" type="sdouble" multiValued="true" indexed="true"/>
189
+ <!-- *** This dynamicField is used by Sunspot! *** -->
190
+ <dynamicField name="*_f" stored="false" type="sfloat" multiValued="false" indexed="true"/>
191
+ <!-- *** This dynamicField is used by Sunspot! *** -->
192
+ <dynamicField name="*_fm" stored="false" type="sfloat" multiValued="true" indexed="true"/>
193
+ <!-- *** This dynamicField is used by Sunspot! *** -->
194
+ <dynamicField name="*_fs" stored="true" type="sfloat" multiValued="false" indexed="true"/>
195
+ <!-- *** This dynamicField is used by Sunspot! *** -->
196
+ <dynamicField name="*_fms" stored="true" type="sfloat" multiValued="true" indexed="true"/>
197
+ <!-- *** This dynamicField is used by Sunspot! *** -->
198
+ <dynamicField name="*_i" stored="false" type="sint" multiValued="false" indexed="true"/>
199
+ <!-- *** This dynamicField is used by Sunspot! *** -->
200
+ <dynamicField name="*_im" stored="false" type="sint" multiValued="true" indexed="true"/>
201
+ <!-- *** This dynamicField is used by Sunspot! *** -->
202
+ <dynamicField name="*_is" stored="true" type="sint" multiValued="false" indexed="true"/>
203
+ <!-- *** This dynamicField is used by Sunspot! *** -->
204
+ <dynamicField name="*_ims" stored="true" type="sint" multiValued="true" indexed="true"/>
205
+ <!-- *** This dynamicField is used by Sunspot! *** -->
206
+ <dynamicField name="*_l" stored="false" type="slong" multiValued="false" indexed="true"/>
207
+ <!-- *** This dynamicField is used by Sunspot! *** -->
208
+ <dynamicField name="*_lm" stored="false" type="slong" multiValued="true" indexed="true"/>
209
+ <!-- *** This dynamicField is used by Sunspot! *** -->
210
+ <dynamicField name="*_ls" stored="true" type="slong" multiValued="false" indexed="true"/>
211
+ <!-- *** This dynamicField is used by Sunspot! *** -->
212
+ <dynamicField name="*_lms" stored="true" type="slong" multiValued="true" indexed="true"/>
213
+ <!-- *** This dynamicField is used by Sunspot! *** -->
214
+ <dynamicField name="*_s" stored="false" type="string" multiValued="false" indexed="true"/>
215
+ <!-- *** This dynamicField is used by Sunspot! *** -->
216
+ <dynamicField name="*_sm" stored="false" type="string" multiValued="true" indexed="true"/>
217
+ <!-- *** This dynamicField is used by Sunspot! *** -->
218
+ <dynamicField name="*_ss" stored="true" type="string" multiValued="false" indexed="true"/>
219
+ <!-- *** This dynamicField is used by Sunspot! *** -->
220
+ <dynamicField name="*_sms" stored="true" type="string" multiValued="true" indexed="true"/>
221
+ <!-- *** This dynamicField is used by Sunspot! *** -->
222
+ <dynamicField name="*_it" stored="false" type="tint" multiValued="false" indexed="true"/>
223
+ <!-- *** This dynamicField is used by Sunspot! *** -->
224
+ <dynamicField name="*_itm" stored="false" type="tint" multiValued="true" indexed="true"/>
225
+ <!-- *** This dynamicField is used by Sunspot! *** -->
226
+ <dynamicField name="*_its" stored="true" type="tint" multiValued="false" indexed="true"/>
227
+ <!-- *** This dynamicField is used by Sunspot! *** -->
228
+ <dynamicField name="*_itms" stored="true" type="tint" multiValued="true" indexed="true"/>
229
+ <!-- *** This dynamicField is used by Sunspot! *** -->
230
+ <dynamicField name="*_ft" stored="false" type="tfloat" multiValued="false" indexed="true"/>
231
+ <!-- *** This dynamicField is used by Sunspot! *** -->
232
+ <dynamicField name="*_ftm" stored="false" type="tfloat" multiValued="true" indexed="true"/>
233
+ <!-- *** This dynamicField is used by Sunspot! *** -->
234
+ <dynamicField name="*_fts" stored="true" type="tfloat" multiValued="false" indexed="true"/>
235
+ <!-- *** This dynamicField is used by Sunspot! *** -->
236
+ <dynamicField name="*_ftms" stored="true" type="tfloat" multiValued="true" indexed="true"/>
237
+ <!-- *** This dynamicField is used by Sunspot! *** -->
238
+ <dynamicField name="*_dt" stored="false" type="tdate" multiValued="false" indexed="true"/>
239
+ <!-- *** This dynamicField is used by Sunspot! *** -->
240
+ <dynamicField name="*_dtm" stored="false" type="tdate" multiValued="true" indexed="true"/>
241
+ <!-- *** This dynamicField is used by Sunspot! *** -->
242
+ <dynamicField name="*_dts" stored="true" type="tdate" multiValued="false" indexed="true"/>
243
+ <!-- *** This dynamicField is used by Sunspot! *** -->
244
+ <dynamicField name="*_dtms" stored="true" type="tdate" multiValued="true" indexed="true"/>
245
+ <!-- *** This dynamicField is used by Sunspot! *** -->
246
+ <dynamicField name="*_textv" stored="false" termVectors="true" type="text" multiValued="true" indexed="true"/>
247
+ <!-- *** This dynamicField is used by Sunspot! *** -->
248
+ <dynamicField name="*_textsv" stored="true" termVectors="true" type="text" multiValued="true" indexed="true"/>
249
+ <!-- *** This dynamicField is used by Sunspot! *** -->
250
+ <dynamicField name="*_et" stored="false" termVectors="true" type="tdouble" multiValued="false" indexed="true"/>
251
+ <!-- *** This dynamicField is used by Sunspot! *** -->
252
+ <dynamicField name="*_etm" stored="false" termVectors="true" type="tdouble" multiValued="true" indexed="true"/>
253
+ <!-- *** This dynamicField is used by Sunspot! *** -->
254
+ <dynamicField name="*_ets" stored="true" termVectors="true" type="tdouble" multiValued="false" indexed="true"/>
255
+ <!-- *** This dynamicField is used by Sunspot! *** -->
256
+ <dynamicField name="*_etms" stored="true" termVectors="true" type="tdouble" multiValued="true" indexed="true"/>
257
+
258
+ <!-- Type used to index the lat and lon components for the "location" FieldType -->
259
+ <dynamicField name="*_coordinate" type="location" indexed="true" stored="false" multiValued="true"/>
260
+ <dynamicField name="*_p" type="location" indexed="true" stored="true" multiValued="false"/>
261
+
262
+ <dynamicField name="*_ll" stored="false" type="location" multiValued="false" indexed="true"/>
263
+ <dynamicField name="*_llm" stored="false" type="location" multiValued="true" indexed="true"/>
264
+ <dynamicField name="*_lls" stored="true" type="location" multiValued="false" indexed="true"/>
265
+ <dynamicField name="*_llms" stored="true" type="location" multiValued="true" indexed="true"/>
266
+ </fields>
267
+ <!-- Field to use to determine and enforce document uniqueness.
268
+ Unless this field is marked with required="false", it will be a required field
269
+ -->
270
+ <uniqueKey>id</uniqueKey>
271
+
272
+ <!-- DEPRECATED: The defaultSearchField is consulted by various query parsers when
273
+ parsing a query string that isn't explicit about the field. Machine (non-user)
274
+ generated queries are best made explicit, or they can use the "df" request parameter
275
+ which takes precedence over this.
276
+ Note: Un-commenting defaultSearchField will be insufficient if your request handler
277
+ in solrconfig.xml defines "df", which takes precedence. That would need to be removed.
278
+ -->
279
+ <defaultSearchField>text</defaultSearchField>
280
+
281
+ <!-- DEPRECATED: The defaultOperator (AND|OR) is consulted by various query parsers
282
+ when parsing a query string to determine if a clause of the query should be marked as
283
+ required or optional, assuming the clause isn't already marked by some operator.
284
+ The default is OR, which is generally assumed so it is not a good idea to change it
285
+ globally here. The "q.op" request parameter takes precedence over this.
286
+ -->
287
+ <solrQueryParser defaultOperator="AND"/>
288
+
289
+ <!-- copyField commands copy one field to another at the time a document
290
+ is added to the index. It's used either to index the same field differently,
291
+ or to add multiple fields to the same field for easier/faster searching. -->
292
+ </schema>
@@ -0,0 +1,1780 @@
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
+ For more details about configurations options that may appear in
21
+ this file, see http://wiki.apache.org/solr/SolrConfigXml.
22
+ -->
23
+ <config>
24
+ <!-- In all configuration below, a prefix of "solr." for class names
25
+ is an alias that causes solr to search appropriate packages,
26
+ including org.apache.solr.(search|update|request|core|analysis)
27
+
28
+ You may also specify a fully qualified Java classname if you
29
+ have your own custom plugins.
30
+ -->
31
+
32
+ <!-- Controls what version of Lucene various components of Solr
33
+ adhere to. Generally, you want to use the latest version to
34
+ get all bug fixes and improvements. It is highly recommended
35
+ that you fully re-index after changing this setting as it can
36
+ affect both how text is indexed and queried.
37
+ -->
38
+ <luceneMatchVersion>LUCENE_41</luceneMatchVersion>
39
+
40
+ <!-- <lib/> directives can be used to instruct Solr to load an Jars
41
+ identified and use them to resolve any "plugins" specified in
42
+ your solrconfig.xml or schema.xml (ie: Analyzers, Request
43
+ Handlers, etc...).
44
+
45
+ All directories and paths are resolved relative to the
46
+ instanceDir.
47
+
48
+ Please note that <lib/> directives are processed in the order
49
+ that they appear in your solrconfig.xml file, and are "stacked"
50
+ on top of each other when building a ClassLoader - so if you have
51
+ plugin jars with dependencies on other jars, the "lower level"
52
+ dependency jars should be loaded first.
53
+
54
+ If a "./lib" directory exists in your instanceDir, all files
55
+ found in it are included as if you had used the following
56
+ syntax...
57
+
58
+ <lib dir="./lib" />
59
+ -->
60
+
61
+ <!-- A 'dir' option by itself adds any files found in the directory
62
+ to the classpath, this is useful for including all jars in a
63
+ directory.
64
+
65
+ When a 'regex' is specified in addition to a 'dir', only the
66
+ files in that directory which completely match the regex
67
+ (anchored on both ends) will be included.
68
+
69
+ The examples below can be used to load some solr-contribs along
70
+ with their external dependencies.
71
+ -->
72
+
73
+ <lib dir="../../contrib/velocity/lib" regex=".*\.jar" />
74
+ <lib dir="../../dist/" regex="solr-velocity-\d.*\.jar" />
75
+
76
+ <!-- If a 'dir' option (with or without a regex) is used and nothing
77
+ is found that matches, it will be ignored
78
+ -->
79
+
80
+ <!-- an exact 'path' can be used instead of a 'dir' to specify a
81
+ specific jar file. This will cause a serious error to be logged
82
+ if it can't be loaded.
83
+ -->
84
+ <!--
85
+ <lib path="../a-jar-that-does-not-exist.jar" />
86
+ -->
87
+
88
+ <!-- Data Directory
89
+
90
+ Used to specify an alternate directory to hold all index data
91
+ other than the default ./data under the Solr home. If
92
+ replication is in use, this should match the replication
93
+ configuration.
94
+ -->
95
+ <dataDir>${solr.data.dir:/data/solr4/data}</dataDir>
96
+
97
+
98
+ <!-- The DirectoryFactory to use for indexes.
99
+
100
+ solr.StandardDirectoryFactory is filesystem
101
+ based and tries to pick the best implementation for the current
102
+ JVM and platform. solr.NRTCachingDirectoryFactory, the default,
103
+ wraps solr.StandardDirectoryFactory and caches small files in memory
104
+ for better NRT performance.
105
+
106
+ One can force a particular implementation via solr.MMapDirectoryFactory,
107
+ solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
108
+
109
+ solr.RAMDirectoryFactory is memory based, not
110
+ persistent, and doesn't work with replication.
111
+ -->
112
+ <directoryFactory name="DirectoryFactory"
113
+ class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
114
+
115
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116
+ Index Config - These settings control low-level behavior of indexing
117
+ Most example settings here show the default value, but are commented
118
+ out, to more easily see where customizations have been made.
119
+
120
+ Note: This replaces <indexDefaults> and <mainIndex> from older versions
121
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
122
+ <indexConfig>
123
+ <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
124
+ LimitTokenCountFilterFactory in your fieldType definition. E.g.
125
+ <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
126
+ -->
127
+ <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
128
+ <!-- <writeLockTimeout>1000</writeLockTimeout> -->
129
+
130
+ <!-- The maximum number of simultaneous threads that may be
131
+ indexing documents at once in IndexWriter; if more than this
132
+ many threads arrive they will wait for others to finish.
133
+ Default in Solr/Lucene is 8. -->
134
+ <!-- <maxIndexingThreads>8</maxIndexingThreads> -->
135
+
136
+ <!-- Expert: Enabling compound file will use less files for the index,
137
+ using fewer file descriptors on the expense of performance decrease.
138
+ Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
139
+ <!-- <useCompoundFile>false</useCompoundFile> -->
140
+
141
+ <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
142
+ indexing for buffering added documents and deletions before they are
143
+ flushed to the Directory.
144
+ maxBufferedDocs sets a limit on the number of documents buffered
145
+ before flushing.
146
+ If both ramBufferSizeMB and maxBufferedDocs is set, then
147
+ Lucene will flush based on whichever limit is hit first. -->
148
+ <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
149
+ <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
150
+
151
+ <!-- Expert: Merge Policy
152
+ The Merge Policy in Lucene controls how merging of segments is done.
153
+ The default since Solr/Lucene 3.3 is TieredMergePolicy.
154
+ The default since Lucene 2.3 was the LogByteSizeMergePolicy,
155
+ Even older versions of Lucene used LogDocMergePolicy.
156
+ -->
157
+ <!--
158
+ <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
159
+ <int name="maxMergeAtOnce">10</int>
160
+ <int name="segmentsPerTier">10</int>
161
+ </mergePolicy>
162
+ -->
163
+
164
+ <!-- Merge Factor
165
+ The merge factor controls how many segments will get merged at a time.
166
+ For TieredMergePolicy, mergeFactor is a convenience parameter which
167
+ will set both MaxMergeAtOnce and SegmentsPerTier at once.
168
+ For LogByteSizeMergePolicy, mergeFactor decides how many new segments
169
+ will be allowed before they are merged into one.
170
+ Default is 10 for both merge policies.
171
+ -->
172
+ <!--
173
+ <mergeFactor>10</mergeFactor>
174
+ -->
175
+
176
+ <!-- Expert: Merge Scheduler
177
+ The Merge Scheduler in Lucene controls how merges are
178
+ performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
179
+ can perform merges in the background using separate threads.
180
+ The SerialMergeScheduler (Lucene 2.2 default) does not.
181
+ -->
182
+ <!--
183
+ <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
184
+ -->
185
+
186
+ <!-- LockFactory
187
+
188
+ This option specifies which Lucene LockFactory implementation
189
+ to use.
190
+
191
+ single = SingleInstanceLockFactory - suggested for a
192
+ read-only index or when there is no possibility of
193
+ another process trying to modify the index.
194
+ native = NativeFSLockFactory - uses OS native file locking.
195
+ Do not use when multiple solr webapps in the same
196
+ JVM are attempting to share a single index.
197
+ simple = SimpleFSLockFactory - uses a plain file for locking
198
+
199
+ Defaults: 'native' is default for Solr3.6 and later, otherwise
200
+ 'simple' is the default
201
+
202
+ More details on the nuances of each LockFactory...
203
+ http://wiki.apache.org/lucene-java/AvailableLockFactories
204
+ -->
205
+ <!-- <lockType>native</lockType> -->
206
+
207
+ <!-- Unlock On Startup
208
+
209
+ If true, unlock any held write or commit locks on startup.
210
+ This defeats the locking mechanism that allows multiple
211
+ processes to safely access a lucene index, and should be used
212
+ with care. Default is "false".
213
+
214
+ This is not needed if lock type is 'none' or 'single'
215
+ -->
216
+ <!--
217
+ <unlockOnStartup>false</unlockOnStartup>
218
+ -->
219
+
220
+ <!-- Expert: Controls how often Lucene loads terms into memory
221
+ Default is 128 and is likely good for most everyone.
222
+ -->
223
+ <!-- <termIndexInterval>128</termIndexInterval> -->
224
+
225
+ <!-- If true, IndexReaders will be reopened (often more efficient)
226
+ instead of closed and then opened. Default: true
227
+ -->
228
+ <!--
229
+ <reopenReaders>true</reopenReaders>
230
+ -->
231
+
232
+ <!-- Commit Deletion Policy
233
+
234
+ Custom deletion policies can be specified here. The class must
235
+ implement org.apache.lucene.index.IndexDeletionPolicy.
236
+
237
+ http://lucene.apache.org/java/3_5_0/api/core/org/apache/lucene/index/IndexDeletionPolicy.html
238
+
239
+ The default Solr IndexDeletionPolicy implementation supports
240
+ deleting index commit points on number of commits, age of
241
+ commit point and optimized status.
242
+
243
+ The latest commit point should always be preserved regardless
244
+ of the criteria.
245
+ -->
246
+ <!--
247
+ <deletionPolicy class="solr.SolrDeletionPolicy">
248
+ -->
249
+ <!-- The number of commit points to be kept -->
250
+ <!-- <str name="maxCommitsToKeep">1</str> -->
251
+ <!-- The number of optimized commit points to be kept -->
252
+ <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
253
+ <!--
254
+ Delete all commit points once they have reached the given age.
255
+ Supports DateMathParser syntax e.g.
256
+ -->
257
+ <!--
258
+ <str name="maxCommitAge">30MINUTES</str>
259
+ <str name="maxCommitAge">1DAY</str>
260
+ -->
261
+ <!--
262
+ </deletionPolicy>
263
+ -->
264
+
265
+ <!-- Lucene Infostream
266
+
267
+ To aid in advanced debugging, Lucene provides an "InfoStream"
268
+ of detailed information when indexing.
269
+
270
+ Setting The value to true will instruct the underlying Lucene
271
+ IndexWriter to write its debugging info the specified file
272
+ -->
273
+ <!-- <infoStream file="INFOSTREAM.txt">false</infoStream> -->
274
+ </indexConfig>
275
+
276
+
277
+ <!-- JMX
278
+
279
+ This example enables JMX if and only if an existing MBeanServer
280
+ is found, use this if you want to configure JMX through JVM
281
+ parameters. Remove this to disable exposing Solr configuration
282
+ and statistics to JMX.
283
+
284
+ For more details see http://wiki.apache.org/solr/SolrJmx
285
+ -->
286
+ <jmx />
287
+ <!-- If you want to connect to a particular server, specify the
288
+ agentId
289
+ -->
290
+ <!-- <jmx agentId="myAgent" /> -->
291
+ <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
292
+ <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
293
+ -->
294
+
295
+ <!-- The default high-performance update handler -->
296
+ <updateHandler class="solr.DirectUpdateHandler2">
297
+
298
+ <!-- Enables a transaction log, used for real-time get, durability, and
299
+ and solr cloud replica recovery. The log can grow as big as
300
+ uncommitted changes to the index, so use of a hard autoCommit
301
+ is recommended (see below).
302
+ "dir" - the target directory for transaction logs, defaults to the
303
+ solr data directory. -->
304
+ <updateLog>
305
+ <str name="dir">${solr.ulog.dir:}</str>
306
+ </updateLog>
307
+
308
+ <!-- AutoCommit
309
+
310
+ Perform a hard commit automatically under certain conditions.
311
+ Instead of enabling autoCommit, consider using "commitWithin"
312
+ when adding documents.
313
+
314
+ http://wiki.apache.org/solr/UpdateXmlMessages
315
+
316
+ maxDocs - Maximum number of documents to add since the last
317
+ commit before automatically triggering a new commit.
318
+
319
+ maxTime - Maximum amount of time in ms that is allowed to pass
320
+ since a document was added before automaticly
321
+ triggering a new commit.
322
+ openSearcher - if false, the commit causes recent index changes
323
+ to be flushed to stable storage, but does not cause a new
324
+ searcher to be opened to make those changes visible.
325
+
326
+ If the updateLog is enabled, then it's highly recommended to
327
+ have some sort of hard autoCommit to limit the log size.
328
+ -->
329
+ <autoCommit>
330
+ <maxTime>3600000</maxTime>
331
+ <maxDocs>100000</maxDocs>
332
+ <openSearcher>false</openSearcher>
333
+ </autoCommit>
334
+
335
+ <!-- softAutoCommit is like autoCommit except it causes a
336
+ 'soft' commit which only ensures that changes are visible
337
+ but does not ensure that data is synced to disk. This is
338
+ faster and more near-realtime friendly than a hard commit.
339
+ -->
340
+
341
+ <autoSoftCommit>
342
+ <maxTime>900000</maxTime>
343
+ </autoSoftCommit>
344
+
345
+
346
+ <!-- Update Related Event Listeners
347
+
348
+ Various IndexWriter related events can trigger Listeners to
349
+ take actions.
350
+
351
+ postCommit - fired after every commit or optimize command
352
+ postOptimize - fired after every optimize command
353
+ -->
354
+ <!-- The RunExecutableListener executes an external command from a
355
+ hook such as postCommit or postOptimize.
356
+
357
+ exe - the name of the executable to run
358
+ dir - dir to use as the current working directory. (default=".")
359
+ wait - the calling thread waits until the executable returns.
360
+ (default="true")
361
+ args - the arguments to pass to the program. (default is none)
362
+ env - environment variables to set. (default is none)
363
+ -->
364
+ <!-- This example shows how RunExecutableListener could be used
365
+ with the script based replication...
366
+ http://wiki.apache.org/solr/CollectionDistribution
367
+ -->
368
+ <!--
369
+ <listener event="postCommit" class="solr.RunExecutableListener">
370
+ <str name="exe">solr/bin/snapshooter</str>
371
+ <str name="dir">.</str>
372
+ <bool name="wait">true</bool>
373
+ <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
374
+ <arr name="env"> <str>MYVAR=val1</str> </arr>
375
+ </listener>
376
+ -->
377
+
378
+ </updateHandler>
379
+
380
+ <!-- IndexReaderFactory
381
+
382
+ Use the following format to specify a custom IndexReaderFactory,
383
+ which allows for alternate IndexReader implementations.
384
+
385
+ ** Experimental Feature **
386
+
387
+ Please note - Using a custom IndexReaderFactory may prevent
388
+ certain other features from working. The API to
389
+ IndexReaderFactory may change without warning or may even be
390
+ removed from future releases if the problems cannot be
391
+ resolved.
392
+
393
+
394
+ ** Features that may not work with custom IndexReaderFactory **
395
+
396
+ The ReplicationHandler assumes a disk-resident index. Using a
397
+ custom IndexReader implementation may cause incompatibility
398
+ with ReplicationHandler and may cause replication to not work
399
+ correctly. See SOLR-1366 for details.
400
+
401
+ -->
402
+ <!--
403
+ <indexReaderFactory name="IndexReaderFactory" class="package.class">
404
+ <str name="someArg">Some Value</str>
405
+ </indexReaderFactory >
406
+ -->
407
+ <!-- By explicitly declaring the Factory, the termIndexDivisor can
408
+ be specified.
409
+ -->
410
+ <!--
411
+ <indexReaderFactory name="IndexReaderFactory"
412
+ class="solr.StandardIndexReaderFactory">
413
+ <int name="setTermIndexDivisor">12</int>
414
+ </indexReaderFactory >
415
+ -->
416
+
417
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
418
+ Query section - these settings control query time things like caches
419
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
420
+ <query>
421
+ <!-- Max Boolean Clauses
422
+
423
+ Maximum number of clauses in each BooleanQuery, an exception
424
+ is thrown if exceeded.
425
+
426
+ ** WARNING **
427
+
428
+ This option actually modifies a global Lucene property that
429
+ will affect all SolrCores. If multiple solrconfig.xml files
430
+ disagree on this property, the value at any given moment will
431
+ be based on the last SolrCore to be initialized.
432
+
433
+ -->
434
+ <maxBooleanClauses>1024</maxBooleanClauses>
435
+
436
+
437
+ <!-- Solr Internal Query Caches
438
+
439
+ There are two implementations of cache available for Solr,
440
+ LRUCache, based on a synchronized LinkedHashMap, and
441
+ FastLRUCache, based on a ConcurrentHashMap.
442
+
443
+ FastLRUCache has faster gets and slower puts in single
444
+ threaded operation and thus is generally faster than LRUCache
445
+ when the hit ratio of the cache is high (> 75%), and may be
446
+ faster under other scenarios on multi-cpu systems.
447
+ -->
448
+
449
+ <!-- Filter Cache
450
+
451
+ Cache used by SolrIndexSearcher for filters (DocSets),
452
+ unordered sets of *all* documents that match a query. When a
453
+ new searcher is opened, its caches may be prepopulated or
454
+ "autowarmed" using data from caches in the old searcher.
455
+ autowarmCount is the number of items to prepopulate. For
456
+ LRUCache, the autowarmed items will be the most recently
457
+ accessed items.
458
+
459
+ Parameters:
460
+ class - the SolrCache implementation LRUCache or
461
+ (LRUCache or FastLRUCache)
462
+ size - the maximum number of entries in the cache
463
+ initialSize - the initial capacity (number of entries) of
464
+ the cache. (see java.util.HashMap)
465
+ autowarmCount - the number of entries to prepopulate from
466
+ and old cache.
467
+ -->
468
+ <filterCache class="solr.FastLRUCache"
469
+ size="4096"
470
+ initialSize="2048"
471
+ autowarmCount="1024"/>
472
+
473
+ <!-- Query Result Cache
474
+
475
+ Caches results of searches - ordered lists of document ids
476
+ (DocList) based on a query, a sort, and the range of documents requested.
477
+ -->
478
+ <queryResultCache class="solr.LRUCache"
479
+ size="4096"
480
+ initialSize="2048"
481
+ autowarmCount="1024"/>
482
+
483
+ <!-- Document Cache
484
+
485
+ Caches Lucene Document objects (the stored fields for each
486
+ document). Since Lucene internal document ids are transient,
487
+ this cache will not be autowarmed.
488
+ -->
489
+ <documentCache class="solr.LRUCache"
490
+ size="4096"
491
+ initialSize="2048"
492
+ autowarmCount="0"/>
493
+
494
+ <!-- Field Value Cache
495
+
496
+ Cache used to hold field values that are quickly accessible
497
+ by document id. The fieldValueCache is created by default
498
+ even if not configured here.
499
+ -->
500
+ <!--
501
+ <fieldValueCache class="solr.FastLRUCache"
502
+ size="512"
503
+ autowarmCount="128"
504
+ showItems="32" />
505
+ -->
506
+
507
+ <!-- Custom Cache
508
+
509
+ Example of a generic cache. These caches may be accessed by
510
+ name through SolrIndexSearcher.getCache(),cacheLookup(), and
511
+ cacheInsert(). The purpose is to enable easy caching of
512
+ user/application level data. The regenerator argument should
513
+ be specified as an implementation of solr.CacheRegenerator
514
+ if autowarming is desired.
515
+ -->
516
+ <!--
517
+ <cache name="myUserCache"
518
+ class="solr.LRUCache"
519
+ size="4096"
520
+ initialSize="1024"
521
+ autowarmCount="1024"
522
+ regenerator="com.mycompany.MyRegenerator"
523
+ />
524
+ -->
525
+
526
+
527
+ <!-- Lazy Field Loading
528
+
529
+ If true, stored fields that are not requested will be loaded
530
+ lazily. This can result in a significant speed improvement
531
+ if the usual case is to not load all stored fields,
532
+ especially if the skipped fields are large compressed text
533
+ fields.
534
+ -->
535
+ <enableLazyFieldLoading>true</enableLazyFieldLoading>
536
+
537
+ <!-- Use Filter For Sorted Query
538
+
539
+ A possible optimization that attempts to use a filter to
540
+ satisfy a search. If the requested sort does not include
541
+ score, then the filterCache will be checked for a filter
542
+ matching the query. If found, the filter will be used as the
543
+ source of document ids, and then the sort will be applied to
544
+ that.
545
+
546
+ For most situations, this will not be useful unless you
547
+ frequently get the same search repeatedly with different sort
548
+ options, and none of them ever use "score"
549
+ -->
550
+ <!--
551
+ <useFilterForSortedQuery>true</useFilterForSortedQuery>
552
+ -->
553
+
554
+ <!-- Result Window Size
555
+
556
+ An optimization for use with the queryResultCache. When a search
557
+ is requested, a superset of the requested number of document ids
558
+ are collected. For example, if a search for a particular query
559
+ requests matching documents 10 through 19, and queryWindowSize is 50,
560
+ then documents 0 through 49 will be collected and cached. Any further
561
+ requests in that range can be satisfied via the cache.
562
+ -->
563
+ <queryResultWindowSize>20</queryResultWindowSize>
564
+
565
+ <!-- Maximum number of documents to cache for any entry in the
566
+ queryResultCache.
567
+ -->
568
+ <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
569
+
570
+ <!-- Query Related Event Listeners
571
+
572
+ Various IndexSearcher related events can trigger Listeners to
573
+ take actions.
574
+
575
+ newSearcher - fired whenever a new searcher is being prepared
576
+ and there is a current searcher handling requests (aka
577
+ registered). It can be used to prime certain caches to
578
+ prevent long request times for certain requests.
579
+
580
+ firstSearcher - fired whenever a new searcher is being
581
+ prepared but there is no current registered searcher to handle
582
+ requests or to gain autowarming data from.
583
+
584
+
585
+ -->
586
+ <!-- QuerySenderListener takes an array of NamedList and executes a
587
+ local query request for each NamedList in sequence.
588
+ -->
589
+ <listener event="newSearcher" class="solr.QuerySenderListener">
590
+ <arr name="queries">
591
+ <!--
592
+ <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
593
+ <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
594
+ -->
595
+ </arr>
596
+ </listener>
597
+ <listener event="firstSearcher" class="solr.QuerySenderListener">
598
+ <arr name="queries">
599
+ <lst>
600
+ <str name="q">static firstSearcher warming in solrconfig.xml</str>
601
+ </lst>
602
+ </arr>
603
+ </listener>
604
+
605
+ <!-- Use Cold Searcher
606
+
607
+ If a search request comes in and there is no current
608
+ registered searcher, then immediately register the still
609
+ warming searcher and use it. If "false" then all requests
610
+ will block until the first searcher is done warming.
611
+ -->
612
+ <useColdSearcher>false</useColdSearcher>
613
+
614
+ <!-- Max Warming Searchers
615
+
616
+ Maximum number of searchers that may be warming in the
617
+ background concurrently. An error is returned if this limit
618
+ is exceeded.
619
+
620
+ Recommend values of 1-2 for read-only slaves, higher for
621
+ masters w/o cache warming.
622
+ -->
623
+ <maxWarmingSearchers>4</maxWarmingSearchers>
624
+
625
+ </query>
626
+
627
+
628
+ <!-- Request Dispatcher
629
+
630
+ This section contains instructions for how the SolrDispatchFilter
631
+ should behave when processing requests for this SolrCore.
632
+
633
+ handleSelect is a legacy option that affects the behavior of requests
634
+ such as /select?qt=XXX
635
+
636
+ handleSelect="true" will cause the SolrDispatchFilter to process
637
+ the request and dispatch the query to a handler specified by the
638
+ "qt" param, assuming "/select" isn't already registered.
639
+
640
+ handleSelect="false" will cause the SolrDispatchFilter to
641
+ ignore "/select" requests, resulting in a 404 unless a handler
642
+ is explicitly registered with the name "/select"
643
+
644
+ handleSelect="true" is not recommended for new users, but is the default
645
+ for backwards compatibility
646
+ -->
647
+ <requestDispatcher handleSelect="false" >
648
+ <!-- Request Parsing
649
+
650
+ These settings indicate how Solr Requests may be parsed, and
651
+ what restrictions may be placed on the ContentStreams from
652
+ those requests
653
+
654
+ enableRemoteStreaming - enables use of the stream.file
655
+ and stream.url parameters for specifying remote streams.
656
+
657
+ multipartUploadLimitInKB - specifies the max size (in KiB) of
658
+ Multipart File Uploads that Solr will allow in a Request.
659
+
660
+ formdataUploadLimitInKB - specifies the max size (in KiB) of
661
+ form data (application/x-www-form-urlencoded) sent via
662
+ POST. You can use POST to pass request parameters not
663
+ fitting into the URL.
664
+
665
+ *** WARNING ***
666
+ The settings below authorize Solr to fetch remote files, You
667
+ should make sure your system has some authentication before
668
+ using enableRemoteStreaming="true"
669
+
670
+ -->
671
+ <requestParsers enableRemoteStreaming="true"
672
+ multipartUploadLimitInKB="2048000"
673
+ formdataUploadLimitInKB="2048"/>
674
+
675
+ <!-- HTTP Caching
676
+
677
+ Set HTTP caching related parameters (for proxy caches and clients).
678
+
679
+ The options below instruct Solr not to output any HTTP Caching
680
+ related headers
681
+ -->
682
+ <httpCaching never304="true" />
683
+ <!-- If you include a <cacheControl> directive, it will be used to
684
+ generate a Cache-Control header (as well as an Expires header
685
+ if the value contains "max-age=")
686
+
687
+ By default, no Cache-Control header is generated.
688
+
689
+ You can use the <cacheControl> option even if you have set
690
+ never304="true"
691
+ -->
692
+ <!--
693
+ <httpCaching never304="true" >
694
+ <cacheControl>max-age=30, public</cacheControl>
695
+ </httpCaching>
696
+ -->
697
+ <!-- To enable Solr to respond with automatically generated HTTP
698
+ Caching headers, and to response to Cache Validation requests
699
+ correctly, set the value of never304="false"
700
+
701
+ This will cause Solr to generate Last-Modified and ETag
702
+ headers based on the properties of the Index.
703
+
704
+ The following options can also be specified to affect the
705
+ values of these headers...
706
+
707
+ lastModFrom - the default value is "openTime" which means the
708
+ Last-Modified value (and validation against If-Modified-Since
709
+ requests) will all be relative to when the current Searcher
710
+ was opened. You can change it to lastModFrom="dirLastMod" if
711
+ you want the value to exactly correspond to when the physical
712
+ index was last modified.
713
+
714
+ etagSeed="..." is an option you can change to force the ETag
715
+ header (and validation against If-None-Match requests) to be
716
+ different even if the index has not changed (ie: when making
717
+ significant changes to your config file)
718
+
719
+ (lastModifiedFrom and etagSeed are both ignored if you use
720
+ the never304="true" option)
721
+ -->
722
+ <!--
723
+ <httpCaching lastModifiedFrom="openTime"
724
+ etagSeed="Solr">
725
+ <cacheControl>max-age=30, public</cacheControl>
726
+ </httpCaching>
727
+ -->
728
+ </requestDispatcher>
729
+
730
+ <!-- Request Handlers
731
+
732
+ http://wiki.apache.org/solr/SolrRequestHandler
733
+
734
+ Incoming queries will be dispatched to a specific handler by name
735
+ based on the path specified in the request.
736
+
737
+ Legacy behavior: If the request path uses "/select" but no Request
738
+ Handler has that name, and if handleSelect="true" has been specified in
739
+ the requestDispatcher, then the Request Handler is dispatched based on
740
+ the qt parameter. Handlers without a leading '/' are accessed this way
741
+ like so: http://host/app/[core/]select?qt=name If no qt is
742
+ given, then the requestHandler that declares default="true" will be
743
+ used or the one named "standard".
744
+
745
+ If a Request Handler is declared with startup="lazy", then it will
746
+ not be initialized until the first request that uses it.
747
+
748
+ -->
749
+ <!-- SearchHandler
750
+
751
+ http://wiki.apache.org/solr/SearchHandler
752
+
753
+ For processing Search Queries, the primary Request Handler
754
+ provided with Solr is "SearchHandler" It delegates to a sequent
755
+ of SearchComponents (see below) and supports distributed
756
+ queries across multiple shards
757
+ -->
758
+ <requestHandler name="/select" class="solr.SearchHandler">
759
+ <!-- default values for query parameters can be specified, these
760
+ will be overridden by parameters in the request
761
+ -->
762
+ <lst name="defaults">
763
+ <str name="echoParams">explicit</str>
764
+ <int name="rows">10</int>
765
+ <str name="df">text</str>
766
+ </lst>
767
+ <!-- In addition to defaults, "appends" params can be specified
768
+ to identify values which should be appended to the list of
769
+ multi-val params from the query (or the existing "defaults").
770
+ -->
771
+ <!-- In this example, the param "fq=instock:true" would be appended to
772
+ any query time fq params the user may specify, as a mechanism for
773
+ partitioning the index, independent of any user selected filtering
774
+ that may also be desired (perhaps as a result of faceted searching).
775
+
776
+ NOTE: there is *absolutely* nothing a client can do to prevent these
777
+ "appends" values from being used, so don't use this mechanism
778
+ unless you are sure you always want it.
779
+ -->
780
+ <!--
781
+ <lst name="appends">
782
+ <str name="fq">inStock:true</str>
783
+ </lst>
784
+ -->
785
+ <!-- "invariants" are a way of letting the Solr maintainer lock down
786
+ the options available to Solr clients. Any params values
787
+ specified here are used regardless of what values may be specified
788
+ in either the query, the "defaults", or the "appends" params.
789
+
790
+ In this example, the facet.field and facet.query params would
791
+ be fixed, limiting the facets clients can use. Faceting is
792
+ not turned on by default - but if the client does specify
793
+ facet=true in the request, these are the only facets they
794
+ will be able to see counts for; regardless of what other
795
+ facet.field or facet.query params they may specify.
796
+
797
+ NOTE: there is *absolutely* nothing a client can do to prevent these
798
+ "invariants" values from being used, so don't use this mechanism
799
+ unless you are sure you always want it.
800
+ -->
801
+ <!--
802
+ <lst name="invariants">
803
+ <str name="facet.field">cat</str>
804
+ <str name="facet.field">manu_exact</str>
805
+ <str name="facet.query">price:[* TO 500]</str>
806
+ <str name="facet.query">price:[500 TO *]</str>
807
+ </lst>
808
+ -->
809
+ <!-- If the default list of SearchComponents is not desired, that
810
+ list can either be overridden completely, or components can be
811
+ prepended or appended to the default list. (see below)
812
+ -->
813
+ <!--
814
+ <arr name="components">
815
+ <str>nameOfCustomComponent1</str>
816
+ <str>nameOfCustomComponent2</str>
817
+ </arr>
818
+ -->
819
+ <arr name="last-components">
820
+ <str>spellcheck</str>
821
+ </arr>
822
+ </requestHandler>
823
+
824
+ <!-- A request handler that returns indented JSON by default -->
825
+ <requestHandler name="/query" class="solr.SearchHandler">
826
+ <lst name="defaults">
827
+ <str name="echoParams">explicit</str>
828
+ <str name="wt">json</str>
829
+ <str name="indent">true</str>
830
+ <str name="df">text</str>
831
+ </lst>
832
+ </requestHandler>
833
+
834
+
835
+ <!-- realtime get handler, guaranteed to return the latest stored fields of
836
+ any document, without the need to commit or open a new searcher. The
837
+ current implementation relies on the updateLog feature being enabled. -->
838
+ <requestHandler name="/get" class="solr.RealTimeGetHandler">
839
+ <lst name="defaults">
840
+ <str name="omitHeader">true</str>
841
+ <str name="wt">json</str>
842
+ <str name="indent">true</str>
843
+ </lst>
844
+ </requestHandler>
845
+
846
+
847
+ <!-- A Robust Example
848
+
849
+ This example SearchHandler declaration shows off usage of the
850
+ SearchHandler with many defaults declared
851
+
852
+ Note that multiple instances of the same Request Handler
853
+ (SearchHandler) can be registered multiple times with different
854
+ names (and different init parameters)
855
+ -->
856
+ <!-- <requestHandler name="/browse" class="solr.SearchHandler">
857
+ <lst name="defaults">
858
+ <str name="echoParams">explicit</str> -->
859
+
860
+ <!-- VelocityResponseWriter settings -->
861
+ <!-- <str name="wt">velocity</str>
862
+ <str name="v.template">browse</str>
863
+ <str name="v.layout">layout</str>
864
+ <str name="title">Solritas</str> -->
865
+
866
+ <!-- Query settings -->
867
+ <!-- <str name="defType">edismax</str>
868
+ <str name="qf">
869
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
870
+ title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
871
+ </str>
872
+ <str name="df">text</str>
873
+ <str name="mm">100%</str>
874
+ <str name="q.alt">*:*</str>
875
+ <str name="rows">10</str>
876
+ <str name="fl">*,score</str>
877
+
878
+ <str name="mlt.qf">
879
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
880
+ title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
881
+ </str>
882
+ <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
883
+ <int name="mlt.count">3</int> -->
884
+
885
+ <!-- Faceting defaults -->
886
+ <!-- <str name="facet">on</str>
887
+ <str name="facet.field">cat</str>
888
+ <str name="facet.field">manu_exact</str>
889
+ <str name="facet.field">content_type</str>
890
+ <str name="facet.field">author_s</str>
891
+ <str name="facet.query">ipod</str>
892
+ <str name="facet.query">GB</str>
893
+ <str name="facet.mincount">1</str>
894
+ <str name="facet.pivot">cat,inStock</str>
895
+ <str name="facet.range.other">after</str>
896
+ <str name="facet.range">price</str>
897
+ <int name="f.price.facet.range.start">0</int>
898
+ <int name="f.price.facet.range.end">600</int>
899
+ <int name="f.price.facet.range.gap">50</int>
900
+ <str name="facet.range">popularity</str>
901
+ <int name="f.popularity.facet.range.start">0</int>
902
+ <int name="f.popularity.facet.range.end">10</int>
903
+ <int name="f.popularity.facet.range.gap">3</int>
904
+ <str name="facet.range">manufacturedate_dt</str>
905
+ <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
906
+ <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
907
+ <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
908
+ <str name="f.manufacturedate_dt.facet.range.other">before</str>
909
+ <str name="f.manufacturedate_dt.facet.range.other">after</str> -->
910
+
911
+ <!-- Highlighting defaults -->
912
+ <!-- <str name="hl">on</str>
913
+ <str name="hl.fl">content features title name</str>
914
+ <str name="hl.encoder">html</str>
915
+ <str name="hl.simple.pre">&lt;b&gt;</str>
916
+ <str name="hl.simple.post">&lt;/b&gt;</str>
917
+ <str name="f.title.hl.fragsize">0</str>
918
+ <str name="f.title.hl.alternateField">title</str>
919
+ <str name="f.name.hl.fragsize">0</str>
920
+ <str name="f.name.hl.alternateField">name</str>
921
+ <str name="f.content.hl.snippets">3</str>
922
+ <str name="f.content.hl.fragsize">200</str>
923
+ <str name="f.content.hl.alternateField">content</str>
924
+ <str name="f.content.hl.maxAlternateFieldLength">750</str> -->
925
+
926
+ <!-- Spell checking defaults -->
927
+ <!-- <str name="spellcheck">on</str>
928
+ <str name="spellcheck.extendedResults">false</str>
929
+ <str name="spellcheck.count">5</str>
930
+ <str name="spellcheck.alternativeTermCount">2</str>
931
+ <str name="spellcheck.maxResultsForSuggest">5</str>
932
+ <str name="spellcheck.collate">true</str>
933
+ <str name="spellcheck.collateExtendedResults">true</str>
934
+ <str name="spellcheck.maxCollationTries">5</str>
935
+ <str name="spellcheck.maxCollations">3</str>
936
+ </lst> -->
937
+
938
+ <!-- append spellchecking to our list of components -->
939
+ <!-- <arr name="last-components">
940
+ <str>spellcheck</str>
941
+ </arr>
942
+ </requestHandler> -->
943
+
944
+
945
+ <!-- Update Request Handler.
946
+
947
+ http://wiki.apache.org/solr/UpdateXmlMessages
948
+
949
+ The canonical Request Handler for Modifying the Index through
950
+ commands specified using XML, JSON, CSV, or JAVABIN
951
+
952
+ Note: Since solr1.1 requestHandlers requires a valid content
953
+ type header if posted in the body. For example, curl now
954
+ requires: -H 'Content-type:text/xml; charset=utf-8'
955
+
956
+ To override the request content type and force a specific
957
+ Content-type, use the request parameter:
958
+ ?update.contentType=text/csv
959
+
960
+ This handler will pick a response format to match the input
961
+ if the 'wt' parameter is not explicit
962
+ -->
963
+ <requestHandler name="/update" class="solr.UpdateRequestHandler">
964
+ <!-- See below for information on defining
965
+ updateRequestProcessorChains that can be used by name
966
+ on each Update Request
967
+ -->
968
+ <!--
969
+ <lst name="defaults">
970
+ <str name="update.chain">dedupe</str>
971
+ </lst>
972
+ -->
973
+ </requestHandler>
974
+
975
+ <!-- for back compat with clients using /update/json and /update/csv -->
976
+ <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">
977
+ <lst name="defaults">
978
+ <str name="stream.contentType">application/json</str>
979
+ </lst>
980
+ </requestHandler>
981
+ <requestHandler name="/update/csv" class="solr.CSVRequestHandler">
982
+ <lst name="defaults">
983
+ <str name="stream.contentType">application/csv</str>
984
+ </lst>
985
+ </requestHandler>
986
+
987
+ <!-- Solr Cell Update Request Handler
988
+
989
+ http://wiki.apache.org/solr/ExtractingRequestHandler
990
+
991
+ -->
992
+ <requestHandler name="/update/extract"
993
+ startup="lazy"
994
+ class="solr.extraction.ExtractingRequestHandler" >
995
+ <lst name="defaults">
996
+ <str name="lowernames">true</str>
997
+ <str name="uprefix">ignored_</str>
998
+
999
+ <!-- capture link hrefs but ignore div attributes -->
1000
+ <str name="captureAttr">true</str>
1001
+ <str name="fmap.a">links</str>
1002
+ <str name="fmap.div">ignored_</str>
1003
+ </lst>
1004
+ </requestHandler>
1005
+
1006
+
1007
+ <!-- Field Analysis Request Handler
1008
+
1009
+ RequestHandler that provides much the same functionality as
1010
+ analysis.jsp. Provides the ability to specify multiple field
1011
+ types and field names in the same request and outputs
1012
+ index-time and query-time analysis for each of them.
1013
+
1014
+ Request parameters are:
1015
+ analysis.fieldname - field name whose analyzers are to be used
1016
+
1017
+ analysis.fieldtype - field type whose analyzers are to be used
1018
+ analysis.fieldvalue - text for index-time analysis
1019
+ q (or analysis.q) - text for query time analysis
1020
+ analysis.showmatch (true|false) - When set to true and when
1021
+ query analysis is performed, the produced tokens of the
1022
+ field value analysis will be marked as "matched" for every
1023
+ token that is produces by the query analysis
1024
+ -->
1025
+ <requestHandler name="/analysis/field"
1026
+ startup="lazy"
1027
+ class="solr.FieldAnalysisRequestHandler" />
1028
+
1029
+
1030
+ <!-- Document Analysis Handler
1031
+
1032
+ http://wiki.apache.org/solr/AnalysisRequestHandler
1033
+
1034
+ An analysis handler that provides a breakdown of the analysis
1035
+ process of provided documents. This handler expects a (single)
1036
+ content stream with the following format:
1037
+
1038
+ <docs>
1039
+ <doc>
1040
+ <field name="id">1</field>
1041
+ <field name="name">The Name</field>
1042
+ <field name="text">The Text Value</field>
1043
+ </doc>
1044
+ <doc>...</doc>
1045
+ <doc>...</doc>
1046
+ ...
1047
+ </docs>
1048
+
1049
+ Note: Each document must contain a field which serves as the
1050
+ unique key. This key is used in the returned response to associate
1051
+ an analysis breakdown to the analyzed document.
1052
+
1053
+ Like the FieldAnalysisRequestHandler, this handler also supports
1054
+ query analysis by sending either an "analysis.query" or "q"
1055
+ request parameter that holds the query text to be analyzed. It
1056
+ also supports the "analysis.showmatch" parameter which when set to
1057
+ true, all field tokens that match the query tokens will be marked
1058
+ as a "match".
1059
+ -->
1060
+ <requestHandler name="/analysis/document"
1061
+ class="solr.DocumentAnalysisRequestHandler"
1062
+ startup="lazy" />
1063
+
1064
+ <!-- Admin Handlers
1065
+
1066
+ Admin Handlers - This will register all the standard admin
1067
+ RequestHandlers.
1068
+ -->
1069
+ <requestHandler name="/admin/"
1070
+ class="solr.admin.AdminHandlers" />
1071
+ <!-- This single handler is equivalent to the following... -->
1072
+ <!--
1073
+ <requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
1074
+ <requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
1075
+ <requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
1076
+ <requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
1077
+ <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
1078
+ <requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
1079
+ -->
1080
+ <!-- If you wish to hide files under ${solr.home}/conf, explicitly
1081
+ register the ShowFileRequestHandler using:
1082
+ -->
1083
+ <!--
1084
+ <requestHandler name="/admin/file"
1085
+ class="solr.admin.ShowFileRequestHandler" >
1086
+ <lst name="invariants">
1087
+ <str name="hidden">synonyms.txt</str>
1088
+ <str name="hidden">anotherfile.txt</str>
1089
+ </lst>
1090
+ </requestHandler>
1091
+ -->
1092
+
1093
+ <!-- ping/healthcheck -->
1094
+ <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
1095
+ <lst name="invariants">
1096
+ <str name="q">solrpingquery</str>
1097
+ </lst>
1098
+ <lst name="defaults">
1099
+ <str name="echoParams">all</str>
1100
+ </lst>
1101
+ <!-- An optional feature of the PingRequestHandler is to configure the
1102
+ handler with a "healthcheckFile" which can be used to enable/disable
1103
+ the PingRequestHandler.
1104
+ relative paths are resolved against the data dir
1105
+ -->
1106
+ <!-- <str name="healthcheckFile">server-enabled.txt</str> -->
1107
+ </requestHandler>
1108
+
1109
+ <!-- Echo the request contents back to the client -->
1110
+ <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
1111
+ <lst name="defaults">
1112
+ <str name="echoParams">explicit</str>
1113
+ <str name="echoHandler">true</str>
1114
+ </lst>
1115
+ </requestHandler>
1116
+
1117
+ <!-- Solr Replication
1118
+
1119
+ The SolrReplicationHandler supports replicating indexes from a
1120
+ "master" used for indexing and "slaves" used for queries.
1121
+
1122
+ http://wiki.apache.org/solr/SolrReplication
1123
+
1124
+ It is also neccessary for SolrCloud to function (in Cloud mode, the
1125
+ replication handler is used to bulk transfer segments when nodes
1126
+ are added or need to recover).
1127
+
1128
+ https://wiki.apache.org/solr/SolrCloud/
1129
+ -->
1130
+ <requestHandler name="/replication" class="solr.ReplicationHandler" >
1131
+ <!--
1132
+ To enable simple master/slave replication, uncomment one of the
1133
+ sections below, depending on wether this solr instance should be
1134
+ the "master" or a "slave". If this instance is a "slave" you will
1135
+ also need to fill in the masterUrl to point to a real machine.
1136
+ -->
1137
+ <!--
1138
+ <lst name="master">
1139
+ <str name="replicateAfter">commit</str>
1140
+ <str name="replicateAfter">startup</str>
1141
+ <str name="confFiles">schema.xml,stopwords.txt</str>
1142
+ </lst>
1143
+ -->
1144
+ <!--
1145
+ <lst name="slave">
1146
+ <str name="masterUrl">http://your-master-hostname:8983/solr</str>
1147
+ <str name="pollInterval">00:00:60</str>
1148
+ </lst>
1149
+ -->
1150
+ </requestHandler>
1151
+
1152
+ <!-- Search Components
1153
+
1154
+ Search components are registered to SolrCore and used by
1155
+ instances of SearchHandler (which can access them by name)
1156
+
1157
+ By default, the following components are available:
1158
+
1159
+ <searchComponent name="query" class="solr.QueryComponent" />
1160
+ <searchComponent name="facet" class="solr.FacetComponent" />
1161
+ <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
1162
+ <searchComponent name="highlight" class="solr.HighlightComponent" />
1163
+ <searchComponent name="stats" class="solr.StatsComponent" />
1164
+ <searchComponent name="debug" class="solr.DebugComponent" />
1165
+
1166
+ Default configuration in a requestHandler would look like:
1167
+
1168
+ <arr name="components">
1169
+ <str>query</str>
1170
+ <str>facet</str>
1171
+ <str>mlt</str>
1172
+ <str>highlight</str>
1173
+ <str>stats</str>
1174
+ <str>debug</str>
1175
+ </arr>
1176
+
1177
+ If you register a searchComponent to one of the standard names,
1178
+ that will be used instead of the default.
1179
+
1180
+ To insert components before or after the 'standard' components, use:
1181
+
1182
+ <arr name="first-components">
1183
+ <str>myFirstComponentName</str>
1184
+ </arr>
1185
+
1186
+ <arr name="last-components">
1187
+ <str>myLastComponentName</str>
1188
+ </arr>
1189
+
1190
+ NOTE: The component registered with the name "debug" will
1191
+ always be executed after the "last-components"
1192
+
1193
+ -->
1194
+
1195
+ <!-- Spell Check
1196
+
1197
+ The spell check component can return a list of alternative spelling
1198
+ suggestions.
1199
+
1200
+ http://wiki.apache.org/solr/SpellCheckComponent
1201
+ -->
1202
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
1203
+
1204
+ <str name="queryAnalyzerFieldType">textSpell</str> -->
1205
+
1206
+ <!-- Multiple "Spell Checkers" can be declared and used by this
1207
+ component
1208
+ -->
1209
+
1210
+ <lst name="spellchecker">
1211
+ <str name="name">default</str>
1212
+ <str name="field">text</str>
1213
+ <str name="classname">solr.DirectSolrSpellChecker</str>
1214
+ <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
1215
+ <str name="distanceMeasure">internal</str>
1216
+ <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
1217
+ <float name="accuracy">0.6</float>
1218
+ <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
1219
+ <int name="maxEdits">2</int>
1220
+ <!-- the minimum shared prefix when enumerating terms -->
1221
+ <int name="minPrefix">1</int>
1222
+ <!-- maximum number of inspections per result. -->
1223
+ <int name="maxInspections">5</int>
1224
+ <!-- minimum length of a query term to be considered for correction -->
1225
+ <int name="minQueryLength">4</int>
1226
+ <!-- maximum threshold of documents a query term can appear to be considered for correction -->
1227
+ <float name="maxQueryFrequency">300</float>
1228
+ <!-- uncomment this to require suggestions to occur in 1% of the documents -->
1229
+
1230
+ <float name="thresholdTokenFrequency">.0001</float>
1231
+
1232
+ </lst>
1233
+
1234
+ <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
1235
+ <!-- <lst name="spellchecker">
1236
+ <str name="name">wordbreak</str>
1237
+ <str name="classname">solr.WordBreakSolrSpellChecker</str>
1238
+ <str name="field">name</str>
1239
+ <str name="combineWords">true</str>
1240
+ <str name="breakWords">true</str>
1241
+ <int name="maxChanges">10</int>
1242
+ </lst> -->
1243
+
1244
+ <!-- a spellchecker that uses a different distance measure -->
1245
+ <!--
1246
+ <lst name="spellchecker">
1247
+ <str name="name">jarowinkler</str>
1248
+ <str name="field">spell</str>
1249
+ <str name="classname">solr.DirectSolrSpellChecker</str>
1250
+ <str name="distanceMeasure">
1251
+ org.apache.lucene.search.spell.JaroWinklerDistance
1252
+ </str>
1253
+ </lst>
1254
+ -->
1255
+
1256
+ <!-- a spellchecker that use an alternate comparator
1257
+
1258
+ comparatorClass be one of:
1259
+ 1. score (default)
1260
+ 2. freq (Frequency first, then score)
1261
+ 3. A fully qualified class name
1262
+ -->
1263
+ <!--
1264
+ <lst name="spellchecker">
1265
+ <str name="name">freq</str>
1266
+ <str name="field">lowerfilt</str>
1267
+ <str name="classname">solr.DirectSolrSpellChecker</str>
1268
+ <str name="comparatorClass">freq</str>
1269
+ -->
1270
+
1271
+ <!-- A spellchecker that reads the list of words from a file -->
1272
+ <!--
1273
+ <lst name="spellchecker">
1274
+ <str name="classname">solr.FileBasedSpellChecker</str>
1275
+ <str name="name">file</str>
1276
+ <str name="sourceLocation">spellings.txt</str>
1277
+ <str name="characterEncoding">UTF-8</str>
1278
+ <str name="spellcheckIndexDir">spellcheckerFile</str>
1279
+ </lst>
1280
+ -->
1281
+ </searchComponent>
1282
+
1283
+ <!-- A request handler for demonstrating the spellcheck component.
1284
+
1285
+ NOTE: This is purely as an example. The whole purpose of the
1286
+ SpellCheckComponent is to hook it into the request handler that
1287
+ handles your normal user queries so that a separate request is
1288
+ not needed to get suggestions.
1289
+
1290
+ IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
1291
+ NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
1292
+
1293
+ See http://wiki.apache.org/solr/SpellCheckComponent for details
1294
+ on the request parameters.
1295
+ -->
1296
+ <!-- <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
1297
+ <lst name="defaults">
1298
+ <str name="df">text</str> -->
1299
+ <!-- Solr will use suggestions from both the 'default' spellchecker
1300
+ and from the 'wordbreak' spellchecker and combine them.
1301
+ collations (re-written queries) can include a combination of
1302
+ corrections from both spellcheckers -->
1303
+ <!-- <str name="spellcheck.dictionary">default</str>
1304
+ <str name="spellcheck.dictionary">wordbreak</str>
1305
+ <str name="spellcheck">on</str>
1306
+ <str name="spellcheck.extendedResults">true</str>
1307
+ <str name="spellcheck.count">10</str>
1308
+ <str name="spellcheck.alternativeTermCount">5</str>
1309
+ <str name="spellcheck.maxResultsForSuggest">5</str>
1310
+ <str name="spellcheck.collate">true</str>
1311
+ <str name="spellcheck.collateExtendedResults">true</str>
1312
+ <str name="spellcheck.maxCollationTries">10</str>
1313
+ <str name="spellcheck.maxCollations">5</str>
1314
+ </lst>
1315
+ <arr name="last-components">
1316
+ <str>spellcheck</str>
1317
+ </arr>
1318
+ </requestHandler> -->
1319
+
1320
+ <!-- Term Vector Component
1321
+
1322
+ http://wiki.apache.org/solr/TermVectorComponent
1323
+ -->
1324
+ <!-- <searchComponent name="tvComponent" class="solr.TermVectorComponent"/> -->
1325
+
1326
+ <!-- A request handler for demonstrating the term vector component
1327
+
1328
+ This is purely as an example.
1329
+
1330
+ In reality you will likely want to add the component to your
1331
+ already specified request handlers.
1332
+ -->
1333
+ <!-- <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
1334
+ <lst name="defaults">
1335
+ <str name="df">text</str>
1336
+ <bool name="tv">true</bool>
1337
+ </lst>
1338
+ <arr name="last-components">
1339
+ <str>tvComponent</str>
1340
+ </arr>
1341
+ </requestHandler> -->
1342
+
1343
+ <!-- Clustering Component
1344
+
1345
+ http://wiki.apache.org/solr/ClusteringComponent
1346
+
1347
+ You'll need to set the solr.clustering.enabled system property
1348
+ when running solr to run with clustering enabled:
1349
+
1350
+ java -Dsolr.clustering.enabled=true -jar start.jar
1351
+
1352
+ -->
1353
+ <!-- <searchComponent name="clustering"
1354
+ enable="${solr.clustering.enabled:false}"
1355
+ class="solr.clustering.ClusteringComponent" > -->
1356
+ <!-- Declare an engine -->
1357
+ <!-- <lst name="engine"> -->
1358
+ <!-- The name, only one can be named "default" -->
1359
+ <!-- <str name="name">default</str> -->
1360
+
1361
+ <!-- Class name of Carrot2 clustering algorithm.
1362
+
1363
+ Currently available algorithms are:
1364
+
1365
+ * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
1366
+ * org.carrot2.clustering.stc.STCClusteringAlgorithm
1367
+ * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
1368
+
1369
+ See http://project.carrot2.org/algorithms.html for the
1370
+ algorithm's characteristics.
1371
+ -->
1372
+ <!-- <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str> -->
1373
+
1374
+ <!-- Overriding values for Carrot2 default algorithm attributes.
1375
+
1376
+ For a description of all available attributes, see:
1377
+ http://download.carrot2.org/stable/manual/#chapter.components.
1378
+ Use attribute key as name attribute of str elements
1379
+ below. These can be further overridden for individual
1380
+ requests by specifying attribute key as request parameter
1381
+ name and attribute value as parameter value.
1382
+ -->
1383
+ <!-- <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str> -->
1384
+
1385
+ <!-- Location of Carrot2 lexical resources.
1386
+
1387
+ A directory from which to load Carrot2-specific stop words
1388
+ and stop labels. Absolute or relative to Solr config directory.
1389
+ If a specific resource (e.g. stopwords.en) is present in the
1390
+ specified dir, it will completely override the corresponding
1391
+ default one that ships with Carrot2.
1392
+
1393
+ For an overview of Carrot2 lexical resources, see:
1394
+ http://download.carrot2.org/head/manual/#chapter.lexical-resources
1395
+ -->
1396
+ <!-- <str name="carrot.lexicalResourcesDir">clustering/carrot2</str> -->
1397
+
1398
+ <!-- The language to assume for the documents.
1399
+
1400
+ For a list of allowed values, see:
1401
+ http://download.carrot2.org/stable/manual/#section.attribute.lingo.MultilingualClustering.defaultLanguage
1402
+ -->
1403
+ <!-- <str name="MultilingualClustering.defaultLanguage">ENGLISH</str>
1404
+ </lst>
1405
+ <lst name="engine">
1406
+ <str name="name">stc</str>
1407
+ <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
1408
+ </lst>
1409
+ </searchComponent> -->
1410
+
1411
+ <!-- A request handler for demonstrating the clustering component
1412
+
1413
+ This is purely as an example.
1414
+
1415
+ In reality you will likely want to add the component to your
1416
+ already specified request handlers.
1417
+ -->
1418
+ <!-- <requestHandler name="/clustering"
1419
+ startup="lazy"
1420
+ enable="${solr.clustering.enabled:false}"
1421
+ class="solr.SearchHandler">
1422
+ <lst name="defaults">
1423
+ <bool name="clustering">true</bool>
1424
+ <str name="clustering.engine">default</str>
1425
+ <bool name="clustering.results">true</bool> -->
1426
+ <!-- The title field -->
1427
+ <!-- <str name="carrot.title">name</str> -->
1428
+ <!-- <str name="carrot.url">id</str> -->
1429
+ <!-- The field to cluster on -->
1430
+ <!-- <str name="carrot.snippet">features</str> -->
1431
+ <!-- produce summaries -->
1432
+ <!-- <bool name="carrot.produceSummary">true</bool> -->
1433
+ <!-- the maximum number of labels per cluster -->
1434
+ <!--<int name="carrot.numDescriptions">5</int>-->
1435
+ <!-- produce sub clusters -->
1436
+ <!-- <bool name="carrot.outputSubClusters">false</bool> -->
1437
+
1438
+ <!-- <str name="defType">edismax</str>
1439
+ <str name="qf">
1440
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
1441
+ </str>
1442
+ <str name="q.alt">*:*</str>
1443
+ <str name="rows">10</str>
1444
+ <str name="fl">*,score</str>
1445
+ </lst>
1446
+ <arr name="last-components">
1447
+ <str>clustering</str>
1448
+ </arr>
1449
+ </requestHandler> -->
1450
+
1451
+ <!-- Terms Component
1452
+
1453
+ http://wiki.apache.org/solr/TermsComponent
1454
+
1455
+ A component to return terms and document frequency of those
1456
+ terms
1457
+ -->
1458
+ <!-- <searchComponent name="terms" class="solr.TermsComponent"/> -->
1459
+
1460
+ <!-- A request handler for demonstrating the terms component -->
1461
+ <!-- <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
1462
+ <lst name="defaults">
1463
+ <bool name="terms">true</bool>
1464
+ <bool name="distrib">false</bool>
1465
+ </lst>
1466
+ <arr name="components">
1467
+ <str>terms</str>
1468
+ </arr>
1469
+ </requestHandler> -->
1470
+
1471
+
1472
+ <!-- Query Elevation Component
1473
+
1474
+ http://wiki.apache.org/solr/QueryElevationComponent
1475
+
1476
+ a search component that enables you to configure the top
1477
+ results for a given query regardless of the normal lucene
1478
+ scoring.
1479
+ -->
1480
+ <!-- <searchComponent name="elevator" class="solr.QueryElevationComponent" > -->
1481
+ <!-- pick a fieldType to analyze queries -->
1482
+ <!-- <str name="queryFieldType">string</str>
1483
+ <str name="config-file">elevate.xml</str>
1484
+ </searchComponent> -->
1485
+
1486
+ <!-- A request handler for demonstrating the elevator component -->
1487
+ <!-- <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
1488
+ <lst name="defaults">
1489
+ <str name="echoParams">explicit</str>
1490
+ <str name="df">text</str>
1491
+ </lst>
1492
+ <arr name="last-components">
1493
+ <str>elevator</str>
1494
+ </arr>
1495
+ </requestHandler> -->
1496
+
1497
+ <!-- Highlighting Component
1498
+
1499
+ http://wiki.apache.org/solr/HighlightingParameters
1500
+ -->
1501
+ <!-- <searchComponent class="solr.HighlightComponent" name="highlight"> -->
1502
+ <!-- <highlighting> -->
1503
+ <!-- Configure the standard fragmenter -->
1504
+ <!-- This could most likely be commented out in the "default" case -->
1505
+ <!-- <fragmenter name="gap"
1506
+ default="true"
1507
+ class="solr.highlight.GapFragmenter">
1508
+ <lst name="defaults">
1509
+ <int name="hl.fragsize">100</int>
1510
+ </lst>
1511
+ </fragmenter> -->
1512
+
1513
+ <!-- A regular-expression-based fragmenter
1514
+ (for sentence extraction)
1515
+ -->
1516
+ <!-- <fragmenter name="regex"
1517
+ class="solr.highlight.RegexFragmenter">
1518
+ <lst name="defaults"> -->
1519
+ <!-- slightly smaller fragsizes work better because of slop -->
1520
+ <!-- <int name="hl.fragsize">70</int> -->
1521
+ <!-- allow 50% slop on fragment sizes -->
1522
+ <!-- <float name="hl.regex.slop">0.5</float> -->
1523
+ <!-- a basic sentence pattern -->
1524
+ <!-- <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
1525
+ </lst>
1526
+ </fragmenter> -->
1527
+
1528
+ <!-- Configure the standard formatter -->
1529
+ <!-- <formatter name="html"
1530
+ default="true"
1531
+ class="solr.highlight.HtmlFormatter">
1532
+ <lst name="defaults">
1533
+ <str name="hl.simple.pre"><![CDATA[<em>]]></str>
1534
+ <str name="hl.simple.post"><![CDATA[</em>]]></str>
1535
+ </lst>
1536
+ </formatter> -->
1537
+
1538
+ <!-- Configure the standard encoder -->
1539
+ <!-- <encoder name="html"
1540
+ class="solr.highlight.HtmlEncoder" /> -->
1541
+
1542
+ <!-- Configure the standard fragListBuilder -->
1543
+ <!-- <fragListBuilder name="simple"
1544
+ class="solr.highlight.SimpleFragListBuilder"/> -->
1545
+
1546
+ <!-- Configure the single fragListBuilder -->
1547
+ <!-- <fragListBuilder name="single"
1548
+ class="solr.highlight.SingleFragListBuilder"/> -->
1549
+
1550
+ <!-- Configure the weighted fragListBuilder -->
1551
+ <!-- <fragListBuilder name="weighted"
1552
+ default="true"
1553
+ class="solr.highlight.WeightedFragListBuilder"/> -->
1554
+
1555
+ <!-- default tag FragmentsBuilder -->
1556
+ <!-- <fragmentsBuilder name="default"
1557
+ default="true"
1558
+ class="solr.highlight.ScoreOrderFragmentsBuilder"> -->
1559
+ <!--
1560
+ <lst name="defaults">
1561
+ <str name="hl.multiValuedSeparatorChar">/</str>
1562
+ </lst>
1563
+ -->
1564
+ <!-- </fragmentsBuilder> -->
1565
+
1566
+ <!-- multi-colored tag FragmentsBuilder -->
1567
+ <!-- <fragmentsBuilder name="colored"
1568
+ class="solr.highlight.ScoreOrderFragmentsBuilder">
1569
+ <lst name="defaults">
1570
+ <str name="hl.tag.pre"><![CDATA[
1571
+ <b style="background:yellow">,<b style="background:lawgreen">,
1572
+ <b style="background:aquamarine">,<b style="background:magenta">,
1573
+ <b style="background:palegreen">,<b style="background:coral">,
1574
+ <b style="background:wheat">,<b style="background:khaki">,
1575
+ <b style="background:lime">,<b style="background:deepskyblue">]]></str>
1576
+ <str name="hl.tag.post"><![CDATA[</b>]]></str>
1577
+ </lst>
1578
+ </fragmentsBuilder>
1579
+
1580
+ <boundaryScanner name="default"
1581
+ default="true"
1582
+ class="solr.highlight.SimpleBoundaryScanner">
1583
+ <lst name="defaults">
1584
+ <str name="hl.bs.maxScan">10</str>
1585
+ <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
1586
+ </lst>
1587
+ </boundaryScanner> -->
1588
+
1589
+ <!-- <boundaryScanner name="breakIterator"
1590
+ class="solr.highlight.BreakIteratorBoundaryScanner">
1591
+ <lst name="defaults"> -->
1592
+ <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
1593
+ <!-- <str name="hl.bs.type">WORD</str> -->
1594
+ <!-- language and country are used when constructing Locale object. -->
1595
+ <!-- And the Locale object will be used when getting instance of BreakIterator -->
1596
+ <!-- <str name="hl.bs.language">en</str>
1597
+ <str name="hl.bs.country">US</str>
1598
+ </lst>
1599
+ </boundaryScanner>
1600
+ </highlighting>
1601
+ </searchComponent> -->
1602
+
1603
+ <!-- Update Processors
1604
+
1605
+ Chains of Update Processor Factories for dealing with Update
1606
+ Requests can be declared, and then used by name in Update
1607
+ Request Processors
1608
+
1609
+ http://wiki.apache.org/solr/UpdateRequestProcessor
1610
+
1611
+ -->
1612
+ <!-- Deduplication
1613
+
1614
+ An example dedup update processor that creates the "id" field
1615
+ on the fly based on the hash code of some other fields. This
1616
+ example has overwriteDupes set to false since we are using the
1617
+ id field as the signatureField and Solr will maintain
1618
+ uniqueness based on that anyway.
1619
+
1620
+ -->
1621
+ <!--
1622
+ <updateRequestProcessorChain name="dedupe">
1623
+ <processor class="solr.processor.SignatureUpdateProcessorFactory">
1624
+ <bool name="enabled">true</bool>
1625
+ <str name="signatureField">id</str>
1626
+ <bool name="overwriteDupes">false</bool>
1627
+ <str name="fields">name,features,cat</str>
1628
+ <str name="signatureClass">solr.processor.Lookup3Signature</str>
1629
+ </processor>
1630
+ <processor class="solr.LogUpdateProcessorFactory" />
1631
+ <processor class="solr.RunUpdateProcessorFactory" />
1632
+ </updateRequestProcessorChain>
1633
+ -->
1634
+
1635
+ <!-- Language identification
1636
+
1637
+ This example update chain identifies the language of the incoming
1638
+ documents using the langid contrib. The detected language is
1639
+ written to field language_s. No field name mapping is done.
1640
+ The fields used for detection are text, title, subject and description,
1641
+ making this example suitable for detecting languages form full-text
1642
+ rich documents injected via ExtractingRequestHandler.
1643
+ See more about langId at http://wiki.apache.org/solr/LanguageDetection
1644
+ -->
1645
+ <!--
1646
+ <updateRequestProcessorChain name="langid">
1647
+ <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
1648
+ <str name="langid.fl">text,title,subject,description</str>
1649
+ <str name="langid.langField">language_s</str>
1650
+ <str name="langid.fallback">en</str>
1651
+ </processor>
1652
+ <processor class="solr.LogUpdateProcessorFactory" />
1653
+ <processor class="solr.RunUpdateProcessorFactory" />
1654
+ </updateRequestProcessorChain>
1655
+ -->
1656
+
1657
+ <!-- Script update processor
1658
+
1659
+ This example hooks in an update processor implemented using JavaScript.
1660
+
1661
+ See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
1662
+ -->
1663
+ <!--
1664
+ <updateRequestProcessorChain name="script">
1665
+ <processor class="solr.StatelessScriptUpdateProcessorFactory">
1666
+ <str name="script">update-script.js</str>
1667
+ <lst name="params">
1668
+ <str name="config_param">example config parameter</str>
1669
+ </lst>
1670
+ </processor>
1671
+ <processor class="solr.RunUpdateProcessorFactory" />
1672
+ </updateRequestProcessorChain>
1673
+ -->
1674
+
1675
+ <!-- Response Writers
1676
+
1677
+ http://wiki.apache.org/solr/QueryResponseWriter
1678
+
1679
+ Request responses will be written using the writer specified by
1680
+ the 'wt' request parameter matching the name of a registered
1681
+ writer.
1682
+
1683
+ The "default" writer is the default and will be used if 'wt' is
1684
+ not specified in the request.
1685
+ -->
1686
+ <!-- The following response writers are implicitly configured unless
1687
+ overridden...
1688
+ -->
1689
+ <!--
1690
+ <queryResponseWriter name="xml"
1691
+ default="true"
1692
+ class="solr.XMLResponseWriter" />
1693
+ <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
1694
+ <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
1695
+ <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
1696
+ <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
1697
+ <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
1698
+ <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
1699
+ -->
1700
+
1701
+ <queryResponseWriter name="json" class="solr.JSONResponseWriter">
1702
+ <!-- For the purposes of the tutorial, JSON responses are written as
1703
+ plain text so that they are easy to read in *any* browser.
1704
+ If you expect a MIME type of "application/json" just remove this override.
1705
+ -->
1706
+ <str name="content-type">text/plain; charset=UTF-8</str>
1707
+ </queryResponseWriter>
1708
+
1709
+ <!--
1710
+ Custom response writers can be declared as needed...
1711
+ -->
1712
+ <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
1713
+
1714
+
1715
+ <!-- XSLT response writer transforms the XML output by any xslt file found
1716
+ in Solr's conf/xslt directory. Changes to xslt files are checked for
1717
+ every xsltCacheLifetimeSeconds.
1718
+ -->
1719
+ <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
1720
+ <int name="xsltCacheLifetimeSeconds">5</int>
1721
+ </queryResponseWriter>
1722
+
1723
+ <!-- Query Parsers
1724
+
1725
+ http://wiki.apache.org/solr/SolrQuerySyntax
1726
+
1727
+ Multiple QParserPlugins can be registered by name, and then
1728
+ used in either the "defType" param for the QueryComponent (used
1729
+ by SearchHandler) or in LocalParams
1730
+ -->
1731
+ <!-- example of registering a query parser -->
1732
+ <!--
1733
+ <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
1734
+ -->
1735
+
1736
+ <!-- Function Parsers
1737
+
1738
+ http://wiki.apache.org/solr/FunctionQuery
1739
+
1740
+ Multiple ValueSourceParsers can be registered by name, and then
1741
+ used as function names when using the "func" QParser.
1742
+ -->
1743
+ <!-- example of registering a custom function parser -->
1744
+ <!--
1745
+ <valueSourceParser name="myfunc"
1746
+ class="com.mycompany.MyValueSourceParser" />
1747
+ -->
1748
+
1749
+
1750
+ <!-- Document Transformers
1751
+ http://wiki.apache.org/solr/DocTransformers
1752
+ -->
1753
+ <!--
1754
+ Could be something like:
1755
+ <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
1756
+ <int name="connection">jdbc://....</int>
1757
+ </transformer>
1758
+
1759
+ To add a constant value to all docs, use:
1760
+ <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1761
+ <int name="value">5</int>
1762
+ </transformer>
1763
+
1764
+ If you want the user to still be able to change it with _value:something_ use this:
1765
+ <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1766
+ <double name="defaultValue">5</double>
1767
+ </transformer>
1768
+
1769
+ If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
1770
+ EditorialMarkerFactory will do exactly that:
1771
+ <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
1772
+ -->
1773
+
1774
+
1775
+ <!-- Legacy config for the admin interface -->
1776
+ <admin>
1777
+ <defaultQuery>*:*</defaultQuery>
1778
+ </admin>
1779
+
1780
+ </config>