ruben-sunspot 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. data/Gemfile +9 -0
  2. data/Gemfile.lock +22 -0
  3. data/History.txt +198 -0
  4. data/LICENSE +18 -0
  5. data/README.rdoc +244 -0
  6. data/Rakefile +11 -0
  7. data/TODO +13 -0
  8. data/VERSION.yml +4 -0
  9. data/bin/sunspot-installer +19 -0
  10. data/bin/sunspot-solr +74 -0
  11. data/installer/config/schema.yml +95 -0
  12. data/lib/light_config.rb +40 -0
  13. data/lib/sunspot.rb +529 -0
  14. data/lib/sunspot/adapters.rb +265 -0
  15. data/lib/sunspot/composite_setup.rb +202 -0
  16. data/lib/sunspot/configuration.rb +46 -0
  17. data/lib/sunspot/data_extractor.rb +50 -0
  18. data/lib/sunspot/dsl.rb +5 -0
  19. data/lib/sunspot/dsl/adjustable.rb +47 -0
  20. data/lib/sunspot/dsl/field_query.rb +266 -0
  21. data/lib/sunspot/dsl/fields.rb +113 -0
  22. data/lib/sunspot/dsl/fulltext.rb +243 -0
  23. data/lib/sunspot/dsl/function.rb +14 -0
  24. data/lib/sunspot/dsl/functional.rb +41 -0
  25. data/lib/sunspot/dsl/more_like_this_query.rb +56 -0
  26. data/lib/sunspot/dsl/paginatable.rb +28 -0
  27. data/lib/sunspot/dsl/query_facet.rb +36 -0
  28. data/lib/sunspot/dsl/restriction.rb +25 -0
  29. data/lib/sunspot/dsl/scope.rb +229 -0
  30. data/lib/sunspot/dsl/search.rb +30 -0
  31. data/lib/sunspot/dsl/standard_query.rb +125 -0
  32. data/lib/sunspot/field.rb +192 -0
  33. data/lib/sunspot/field_factory.rb +147 -0
  34. data/lib/sunspot/indexer.rb +131 -0
  35. data/lib/sunspot/installer.rb +31 -0
  36. data/lib/sunspot/installer/library_installer.rb +45 -0
  37. data/lib/sunspot/installer/schema_builder.rb +219 -0
  38. data/lib/sunspot/installer/solrconfig_updater.rb +106 -0
  39. data/lib/sunspot/installer/task_helper.rb +18 -0
  40. data/lib/sunspot/query.rb +10 -0
  41. data/lib/sunspot/query/abstract_field_facet.rb +52 -0
  42. data/lib/sunspot/query/boost_query.rb +24 -0
  43. data/lib/sunspot/query/common_query.rb +85 -0
  44. data/lib/sunspot/query/composite_fulltext.rb +31 -0
  45. data/lib/sunspot/query/connective.rb +195 -0
  46. data/lib/sunspot/query/date_field_facet.rb +14 -0
  47. data/lib/sunspot/query/dismax.rb +126 -0
  48. data/lib/sunspot/query/field_facet.rb +41 -0
  49. data/lib/sunspot/query/filter.rb +38 -0
  50. data/lib/sunspot/query/function_query.rb +52 -0
  51. data/lib/sunspot/query/highlighting.rb +55 -0
  52. data/lib/sunspot/query/local.rb +26 -0
  53. data/lib/sunspot/query/more_like_this.rb +60 -0
  54. data/lib/sunspot/query/more_like_this_query.rb +12 -0
  55. data/lib/sunspot/query/pagination.rb +38 -0
  56. data/lib/sunspot/query/query_facet.rb +16 -0
  57. data/lib/sunspot/query/restriction.rb +265 -0
  58. data/lib/sunspot/query/scope.rb +16 -0
  59. data/lib/sunspot/query/sort.rb +95 -0
  60. data/lib/sunspot/query/sort_composite.rb +33 -0
  61. data/lib/sunspot/query/standard_query.rb +20 -0
  62. data/lib/sunspot/query/text_field_boost.rb +17 -0
  63. data/lib/sunspot/schema.rb +151 -0
  64. data/lib/sunspot/search.rb +9 -0
  65. data/lib/sunspot/search/abstract_search.rb +302 -0
  66. data/lib/sunspot/search/date_facet.rb +35 -0
  67. data/lib/sunspot/search/facet_row.rb +27 -0
  68. data/lib/sunspot/search/field_facet.rb +88 -0
  69. data/lib/sunspot/search/highlight.rb +38 -0
  70. data/lib/sunspot/search/hit.rb +136 -0
  71. data/lib/sunspot/search/more_like_this_search.rb +31 -0
  72. data/lib/sunspot/search/query_facet.rb +62 -0
  73. data/lib/sunspot/search/standard_search.rb +21 -0
  74. data/lib/sunspot/server.rb +152 -0
  75. data/lib/sunspot/session.rb +252 -0
  76. data/lib/sunspot/session_proxy.rb +71 -0
  77. data/lib/sunspot/session_proxy/abstract_session_proxy.rb +29 -0
  78. data/lib/sunspot/session_proxy/class_sharding_session_proxy.rb +66 -0
  79. data/lib/sunspot/session_proxy/id_sharding_session_proxy.rb +89 -0
  80. data/lib/sunspot/session_proxy/master_slave_session_proxy.rb +43 -0
  81. data/lib/sunspot/session_proxy/sharding_session_proxy.rb +215 -0
  82. data/lib/sunspot/session_proxy/thread_local_session_proxy.rb +37 -0
  83. data/lib/sunspot/setup.rb +360 -0
  84. data/lib/sunspot/text_field_setup.rb +29 -0
  85. data/lib/sunspot/type.rb +342 -0
  86. data/lib/sunspot/util.rb +253 -0
  87. data/lib/sunspot/version.rb +3 -0
  88. data/solr/etc/jetty.xml +214 -0
  89. data/solr/etc/webdefault.xml +379 -0
  90. data/solr/lib/jetty-6.1.3.jar +0 -0
  91. data/solr/lib/jetty-util-6.1.3.jar +0 -0
  92. data/solr/lib/jsp-2.1/ant-1.6.5.jar +0 -0
  93. data/solr/lib/jsp-2.1/core-3.1.1.jar +0 -0
  94. data/solr/lib/jsp-2.1/jsp-2.1.jar +0 -0
  95. data/solr/lib/jsp-2.1/jsp-api-2.1.jar +0 -0
  96. data/solr/lib/servlet-api-2.5-6.1.3.jar +0 -0
  97. data/solr/solr/conf/admin-extra.html +31 -0
  98. data/solr/solr/conf/elevate.xml +36 -0
  99. data/solr/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  100. data/solr/solr/conf/protwords.txt +21 -0
  101. data/solr/solr/conf/schema.xml +238 -0
  102. data/solr/solr/conf/scripts.conf +24 -0
  103. data/solr/solr/conf/solrconfig.xml +938 -0
  104. data/solr/solr/conf/spellings.txt +2 -0
  105. data/solr/solr/conf/stopwords.txt +58 -0
  106. data/solr/solr/conf/synonyms.txt +31 -0
  107. data/solr/solr/lib/lucene-spatial-2.9.1.jar +0 -0
  108. data/solr/solr/lib/solr-spatial-light-0.0.6.jar +0 -0
  109. data/solr/start.jar +0 -0
  110. data/solr/webapps/solr.war +0 -0
  111. data/spec/api/adapters_spec.rb +33 -0
  112. data/spec/api/binding_spec.rb +38 -0
  113. data/spec/api/indexer/attributes_spec.rb +149 -0
  114. data/spec/api/indexer/batch_spec.rb +46 -0
  115. data/spec/api/indexer/dynamic_fields_spec.rb +42 -0
  116. data/spec/api/indexer/fixed_fields_spec.rb +57 -0
  117. data/spec/api/indexer/fulltext_spec.rb +43 -0
  118. data/spec/api/indexer/removal_spec.rb +53 -0
  119. data/spec/api/indexer/spec_helper.rb +1 -0
  120. data/spec/api/indexer_spec.rb +14 -0
  121. data/spec/api/query/advanced_manipulation_examples.rb +35 -0
  122. data/spec/api/query/connectives_examples.rb +186 -0
  123. data/spec/api/query/dsl_spec.rb +18 -0
  124. data/spec/api/query/dynamic_fields_examples.rb +165 -0
  125. data/spec/api/query/faceting_examples.rb +399 -0
  126. data/spec/api/query/fulltext_examples.rb +315 -0
  127. data/spec/api/query/function_spec.rb +70 -0
  128. data/spec/api/query/highlighting_examples.rb +225 -0
  129. data/spec/api/query/local_examples.rb +38 -0
  130. data/spec/api/query/more_like_this_spec.rb +140 -0
  131. data/spec/api/query/ordering_pagination_examples.rb +97 -0
  132. data/spec/api/query/scope_examples.rb +263 -0
  133. data/spec/api/query/spec_helper.rb +1 -0
  134. data/spec/api/query/standard_spec.rb +28 -0
  135. data/spec/api/query/text_field_scoping_examples.rb +30 -0
  136. data/spec/api/query/types_spec.rb +20 -0
  137. data/spec/api/search/dynamic_fields_spec.rb +33 -0
  138. data/spec/api/search/faceting_spec.rb +356 -0
  139. data/spec/api/search/highlighting_spec.rb +69 -0
  140. data/spec/api/search/hits_spec.rb +149 -0
  141. data/spec/api/search/results_spec.rb +79 -0
  142. data/spec/api/search/search_spec.rb +23 -0
  143. data/spec/api/search/spec_helper.rb +1 -0
  144. data/spec/api/server_spec.rb +91 -0
  145. data/spec/api/session_proxy/class_sharding_session_proxy_spec.rb +85 -0
  146. data/spec/api/session_proxy/id_sharding_session_proxy_spec.rb +30 -0
  147. data/spec/api/session_proxy/master_slave_session_proxy_spec.rb +41 -0
  148. data/spec/api/session_proxy/sharding_session_proxy_spec.rb +77 -0
  149. data/spec/api/session_proxy/spec_helper.rb +9 -0
  150. data/spec/api/session_proxy/thread_local_session_proxy_spec.rb +50 -0
  151. data/spec/api/session_spec.rb +198 -0
  152. data/spec/api/spec_helper.rb +3 -0
  153. data/spec/api/sunspot_spec.rb +18 -0
  154. data/spec/ext.rb +11 -0
  155. data/spec/helpers/indexer_helper.rb +29 -0
  156. data/spec/helpers/query_helper.rb +38 -0
  157. data/spec/helpers/search_helper.rb +80 -0
  158. data/spec/integration/dynamic_fields_spec.rb +55 -0
  159. data/spec/integration/faceting_spec.rb +238 -0
  160. data/spec/integration/highlighting_spec.rb +22 -0
  161. data/spec/integration/indexing_spec.rb +33 -0
  162. data/spec/integration/keyword_search_spec.rb +317 -0
  163. data/spec/integration/local_search_spec.rb +91 -0
  164. data/spec/integration/more_like_this_spec.rb +43 -0
  165. data/spec/integration/scoped_search_spec.rb +349 -0
  166. data/spec/integration/spec_helper.rb +7 -0
  167. data/spec/integration/stored_fields_spec.rb +10 -0
  168. data/spec/integration/test_pagination.rb +32 -0
  169. data/spec/mocks/adapters.rb +32 -0
  170. data/spec/mocks/blog.rb +3 -0
  171. data/spec/mocks/comment.rb +21 -0
  172. data/spec/mocks/connection.rb +126 -0
  173. data/spec/mocks/mock_adapter.rb +30 -0
  174. data/spec/mocks/mock_class_sharding_session_proxy.rb +24 -0
  175. data/spec/mocks/mock_record.rb +52 -0
  176. data/spec/mocks/mock_sharding_session_proxy.rb +15 -0
  177. data/spec/mocks/photo.rb +12 -0
  178. data/spec/mocks/post.rb +76 -0
  179. data/spec/mocks/super_class.rb +2 -0
  180. data/spec/mocks/user.rb +8 -0
  181. data/spec/spec_helper.rb +52 -0
  182. data/tasks/gemspec.rake +33 -0
  183. data/tasks/rcov.rake +28 -0
  184. data/tasks/rdoc.rake +27 -0
  185. data/tasks/schema.rake +19 -0
  186. data/tasks/spec.rake +24 -0
  187. data/tasks/todo.rake +4 -0
  188. metadata +356 -0
@@ -0,0 +1,24 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership.
4
+ # The ASF licenses this file to You under the Apache License, Version 2.0
5
+ # (the "License"); you may not use this file except in compliance with
6
+ # the License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ user=
17
+ solr_hostname=localhost
18
+ solr_port=8983
19
+ rsyncd_port=18983
20
+ data_dir=
21
+ webapp_name=solr
22
+ master_host=
23
+ master_data_dir=
24
+ master_status_dir=
@@ -0,0 +1,938 @@
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
+ For more details about configurations options that may appear in this
20
+ file, see http://wiki.apache.org/solr/SolrConfigXml.
21
+
22
+ Specifically, the Solr Config can support XInclude, which may make it easier to manage
23
+ the configuration. See https://issues.apache.org/jira/browse/SOLR-1167
24
+ -->
25
+ <config>
26
+ <!-- Set this to 'false' if you want solr to continue working after it has
27
+ encountered an severe configuration error. In a production environment,
28
+ you may want solr to keep working even if one handler is mis-configured.
29
+
30
+ You may also set this to false using by setting the system property:
31
+ -Dsolr.abortOnConfigurationError=false
32
+ -->
33
+ <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
34
+ <!-- lib directives can be used to instruct Solr to load an Jars identified
35
+ and use them to resolve any "plugins" specified in your solrconfig.xml or
36
+ schema.xml (ie: Analyzers, Request Handlers, etc...).
37
+
38
+ All directories and paths are resolved relative the instanceDir.
39
+
40
+ If a "./lib" directory exists in your instanceDir, all files found in it
41
+ are included as if you had used the following syntax...
42
+
43
+ <lib dir="./lib" />
44
+ -->
45
+ <!-- A dir option by itself adds any files found in the directory to the
46
+ classpath, this is useful for including all jars in a directory.
47
+ -->
48
+ <lib dir="../../contrib/extraction/lib"/>
49
+ <!-- When a regex is specified in addition to a directory, only the files in that
50
+ directory which completely match the regex (anchored on both ends)
51
+ will be included.
52
+ -->
53
+ <lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar"/>
54
+ <lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar"/>
55
+ <!-- If a dir option (with or without a regex) is used and nothing is found
56
+ that matches, it will be ignored
57
+ -->
58
+ <lib dir="../../contrib/clustering/lib/downloads/"/>
59
+ <lib dir="../../contrib/clustering/lib/"/>
60
+ <lib dir="/total/crap/dir/ignored"/>
61
+ <!-- an exact path can be used to specify a specific file. This will cause
62
+ a serious error to be logged if it can't be loaded.
63
+ <lib path="../a-jar-that-does-not-exist.jar" />
64
+ -->
65
+ <!-- Used to specify an alternate directory to hold all index data
66
+ other than the default ./data under the Solr home.
67
+ If replication is in use, this should match the replication configuration. -->
68
+ <dataDir>${solr.data.dir:./solr/data}</dataDir>
69
+ <!-- WARNING: this <indexDefaults> section only provides defaults for index writers
70
+ in general. See also the <mainIndex> section after that when changing parameters
71
+ for Solr's main Lucene index. -->
72
+ <indexDefaults>
73
+ <!-- Values here affect all index writers and act as a default unless overridden. -->
74
+ <useCompoundFile>false</useCompoundFile>
75
+ <mergeFactor>10</mergeFactor>
76
+ <!-- If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush
77
+ based on whichever limit is hit first. -->
78
+ <!--<maxBufferedDocs>1000</maxBufferedDocs>-->
79
+ <!-- Sets the amount of RAM that may be used by Lucene indexing
80
+ for buffering added documents and deletions before they are
81
+ flushed to the Directory. -->
82
+ <ramBufferSizeMB>32</ramBufferSizeMB>
83
+ <!-- <maxMergeDocs>2147483647</maxMergeDocs> -->
84
+ <maxFieldLength>10000</maxFieldLength>
85
+ <writeLockTimeout>1000</writeLockTimeout>
86
+ <commitLockTimeout>10000</commitLockTimeout>
87
+ <!--
88
+ Expert: Turn on Lucene's auto commit capability. This causes intermediate
89
+ segment flushes to write a new lucene index descriptor, enabling it to be
90
+ opened by an external IndexReader. This can greatly slow down indexing
91
+ speed. NOTE: Despite the name, this value does not have any relation to
92
+ Solr's autoCommit functionality
93
+ -->
94
+ <!--<luceneAutoCommit>false</luceneAutoCommit>-->
95
+ <!--
96
+ Expert: The Merge Policy in Lucene controls how merging is handled by
97
+ Lucene. The default in 2.3 is the LogByteSizeMergePolicy, previous
98
+ versions used LogDocMergePolicy.
99
+
100
+ LogByteSizeMergePolicy chooses segments to merge based on their size. The
101
+ Lucene 2.2 default, LogDocMergePolicy chose when to merge based on number
102
+ of documents
103
+
104
+ Other implementations of MergePolicy must have a no-argument constructor
105
+ -->
106
+ <!--<mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy"/>-->
107
+ <!--
108
+ Expert:
109
+ The Merge Scheduler in Lucene controls how merges are performed. The
110
+ ConcurrentMergeScheduler (Lucene 2.3 default) can perform merges in the
111
+ background using separate threads. The SerialMergeScheduler (Lucene 2.2
112
+ default) does not.
113
+ -->
114
+ <!--<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>-->
115
+ <!--
116
+ This option specifies which Lucene LockFactory implementation to use.
117
+
118
+ single = SingleInstanceLockFactory - suggested for a read-only index
119
+ or when there is no possibility of another process trying
120
+ to modify the index.
121
+ native = NativeFSLockFactory - uses OS native file locking
122
+ simple = SimpleFSLockFactory - uses a plain file for locking
123
+
124
+ (For backwards compatibility with Solr 1.2, 'simple' is the default
125
+ if not specified.)
126
+ -->
127
+ <lockType>native</lockType>
128
+ <!--
129
+ Expert:
130
+ Controls how often Lucene loads terms into memory -->
131
+ <!--<termIndexInterval>256</termIndexInterval>-->
132
+ </indexDefaults>
133
+ <mainIndex>
134
+ <!-- options specific to the main on-disk lucene index -->
135
+ <useCompoundFile>false</useCompoundFile>
136
+ <ramBufferSizeMB>32</ramBufferSizeMB>
137
+ <mergeFactor>10</mergeFactor>
138
+ <!-- Deprecated -->
139
+ <!--<maxBufferedDocs>1000</maxBufferedDocs>-->
140
+ <!--<maxMergeDocs>2147483647</maxMergeDocs>-->
141
+ <!-- inherit from indexDefaults <maxFieldLength>10000</maxFieldLength> -->
142
+ <!-- If true, unlock any held write or commit locks on startup.
143
+ This defeats the locking mechanism that allows multiple
144
+ processes to safely access a lucene index, and should be
145
+ used with care.
146
+ This is not needed if lock type is 'none' or 'single'
147
+ -->
148
+ <unlockOnStartup>false</unlockOnStartup>
149
+ <!-- If true, IndexReaders will be reopened (often more efficient) instead
150
+ of closed and then opened. -->
151
+ <reopenReaders>true</reopenReaders>
152
+ <!--
153
+ Expert:
154
+ Controls how often Lucene loads terms into memory. Default is 128 and is likely good for most everyone. -->
155
+ <!--<termIndexInterval>256</termIndexInterval>-->
156
+ <!--
157
+ Custom deletion policies can specified here. The class must
158
+ implement org.apache.lucene.index.IndexDeletionPolicy.
159
+
160
+ http://lucene.apache.org/java/2_3_2/api/org/apache/lucene/index/IndexDeletionPolicy.html
161
+
162
+ The standard Solr IndexDeletionPolicy implementation supports deleting
163
+ index commit points on number of commits, age of commit point and
164
+ optimized status.
165
+
166
+ The latest commit point should always be preserved regardless
167
+ of the criteria.
168
+ -->
169
+ <deletionPolicy class="solr.SolrDeletionPolicy">
170
+ <!-- The number of commit points to be kept -->
171
+ <str name="maxCommitsToKeep">1</str>
172
+ <!-- The number of optimized commit points to be kept -->
173
+ <str name="maxOptimizedCommitsToKeep">0</str>
174
+ <!--
175
+ Delete all commit points once they have reached the given age.
176
+ Supports DateMathParser syntax e.g.
177
+
178
+ <str name="maxCommitAge">30MINUTES</str>
179
+ <str name="maxCommitAge">1DAY</str>
180
+ -->
181
+ </deletionPolicy>
182
+ <!-- To aid in advanced debugging, you may turn on IndexWriter debug logging.
183
+ Setting to true will set the file that the underlying Lucene IndexWriter
184
+ will write its debug infostream to. -->
185
+ <infoStream file="INFOSTREAM.txt">false</infoStream>
186
+ </mainIndex>
187
+ <!-- Enables JMX if and only if an existing MBeanServer is found, use this
188
+ if you want to configure JMX through JVM parameters. Remove this to disable
189
+ exposing Solr configuration and statistics to JMX.
190
+
191
+ If you want to connect to a particular server, specify the agentId
192
+ e.g. <jmx agentId="myAgent" />
193
+
194
+ If you want to start a new MBeanServer, specify the serviceUrl
195
+ e.g <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
196
+
197
+ For more details see http://wiki.apache.org/solr/SolrJmx
198
+ -->
199
+ <jmx/>
200
+ <!-- the default high-performance update handler -->
201
+ <updateHandler class="solr.DirectUpdateHandler2">
202
+ <!-- A prefix of "solr." for class names is an alias that
203
+ causes solr to search appropriate packages, including
204
+ org.apache.solr.(search|update|request|core|analysis)
205
+ -->
206
+ <!-- Perform a <commit/> automatically under certain conditions:
207
+ maxDocs - number of updates since last commit is greater than this
208
+ maxTime - oldest uncommited update (in ms) is this long ago
209
+ Instead of enabling autoCommit, consider using "commitWithin"
210
+ when adding documents. http://wiki.apache.org/solr/UpdateXmlMessages
211
+ <autoCommit>
212
+ <maxDocs>10000</maxDocs>
213
+ <maxTime>1000</maxTime>
214
+ </autoCommit>
215
+ -->
216
+ <!-- The RunExecutableListener executes an external command from a
217
+ hook such as postCommit or postOptimize.
218
+ exe - the name of the executable to run
219
+ dir - dir to use as the current working directory. default="."
220
+ wait - the calling thread waits until the executable returns. default="true"
221
+ args - the arguments to pass to the program. default=nothing
222
+ env - environment variables to set. default=nothing
223
+ -->
224
+ <!-- A postCommit event is fired after every commit or optimize command
225
+ <listener event="postCommit" class="solr.RunExecutableListener">
226
+ <str name="exe">solr/bin/snapshooter</str>
227
+ <str name="dir">.</str>
228
+ <bool name="wait">true</bool>
229
+ <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
230
+ <arr name="env"> <str>MYVAR=val1</str> </arr>
231
+ </listener>
232
+ -->
233
+ <!-- A postOptimize event is fired only after every optimize command
234
+ <listener event="postOptimize" class="solr.RunExecutableListener">
235
+ <str name="exe">snapshooter</str>
236
+ <str name="dir">solr/bin</str>
237
+ <bool name="wait">true</bool>
238
+ </listener>
239
+ -->
240
+ </updateHandler>
241
+ <!-- Use the following format to specify a custom IndexReaderFactory - allows for alternate
242
+ IndexReader implementations.
243
+
244
+ ** Experimental Feature **
245
+ Please note - Using a custom IndexReaderFactory may prevent certain other features
246
+ from working. The API to IndexReaderFactory may change without warning or may even
247
+ be removed from future releases if the problems cannot be resolved.
248
+
249
+ ** Features that may not work with custom IndexReaderFactory **
250
+ The ReplicationHandler assumes a disk-resident index. Using a custom
251
+ IndexReader implementation may cause incompatibility with ReplicationHandler and
252
+ may cause replication to not work correctly. See SOLR-1366 for details.
253
+
254
+ <indexReaderFactory name="IndexReaderFactory" class="package.class">
255
+ Parameters as required by the implementation
256
+ </indexReaderFactory >
257
+ -->
258
+ <!-- To set the termInfosIndexDivisor, do this: -->
259
+ <!--<indexReaderFactory name="IndexReaderFactory" class="org.apache.solr.core.StandardIndexReaderFactory">
260
+ <int name="termInfosIndexDivisor">12</int>
261
+ </indexReaderFactory >-->
262
+ <query>
263
+ <!-- Maximum number of clauses in a boolean query... in the past, this affected
264
+ range or prefix queries that expanded to big boolean queries - built in Solr
265
+ query parsers no longer create queries with this limitation.
266
+ An exception is thrown if exceeded. -->
267
+ <maxBooleanClauses>1024</maxBooleanClauses>
268
+ <!-- There are two implementations of cache available for Solr,
269
+ LRUCache, based on a synchronized LinkedHashMap, and
270
+ FastLRUCache, based on a ConcurrentHashMap. FastLRUCache has faster gets
271
+ and slower puts in single threaded operation and thus is generally faster
272
+ than LRUCache when the hit ratio of the cache is high (> 75%), and may be
273
+ faster under other scenarios on multi-cpu systems. -->
274
+ <!-- Cache used by SolrIndexSearcher for filters (DocSets),
275
+ unordered sets of *all* documents that match a query.
276
+ When a new searcher is opened, its caches may be prepopulated
277
+ or "autowarmed" using data from caches in the old searcher.
278
+ autowarmCount is the number of items to prepopulate. For LRUCache,
279
+ the autowarmed items will be the most recently accessed items.
280
+ Parameters:
281
+ class - the SolrCache implementation LRUCache or FastLRUCache
282
+ size - the maximum number of entries in the cache
283
+ initialSize - the initial capacity (number of entries) of
284
+ the cache. (seel java.util.HashMap)
285
+ autowarmCount - the number of entries to prepopulate from
286
+ and old cache.
287
+ -->
288
+ <filterCache class="solr.FastLRUCache" size="512" initialSize="512" autowarmCount="0"/>
289
+ <!-- Cache used to hold field values that are quickly accessible
290
+ by document id. The fieldValueCache is created by default
291
+ even if not configured here.
292
+ <fieldValueCache
293
+ class="solr.FastLRUCache"
294
+ size="512"
295
+ autowarmCount="128"
296
+ showItems="32"
297
+ />
298
+ -->
299
+ <!-- queryResultCache caches results of searches - ordered lists of
300
+ document ids (DocList) based on a query, a sort, and the range
301
+ of documents requested. -->
302
+ <queryResultCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="0"/>
303
+ <!-- documentCache caches Lucene Document objects (the stored fields for each document).
304
+ Since Lucene internal document ids are transient, this cache will not be autowarmed. -->
305
+ <documentCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="0"/>
306
+ <!-- If true, stored fields that are not requested will be loaded lazily.
307
+ This can result in a significant speed improvement if the usual case is to
308
+ not load all stored fields, especially if the skipped fields are large
309
+ compressed text fields.
310
+ -->
311
+ <enableLazyFieldLoading>true</enableLazyFieldLoading>
312
+ <!-- Example of a generic cache. These caches may be accessed by name
313
+ through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
314
+ The purpose is to enable easy caching of user/application level data.
315
+ The regenerator argument should be specified as an implementation
316
+ of solr.search.CacheRegenerator if autowarming is desired. -->
317
+ <!--
318
+ <cache name="myUserCache"
319
+ class="solr.LRUCache"
320
+ size="4096"
321
+ initialSize="1024"
322
+ autowarmCount="1024"
323
+ regenerator="org.mycompany.mypackage.MyRegenerator"
324
+ />
325
+ -->
326
+ <!-- An optimization that attempts to use a filter to satisfy a search.
327
+ If the requested sort does not include score, then the filterCache
328
+ will be checked for a filter matching the query. If found, the filter
329
+ will be used as the source of document ids, and then the sort will be
330
+ applied to that.
331
+ <useFilterForSortedQuery>true</useFilterForSortedQuery>
332
+ -->
333
+ <!-- An optimization for use with the queryResultCache. When a search
334
+ is requested, a superset of the requested number of document ids
335
+ are collected. For example, if a search for a particular query
336
+ requests matching documents 10 through 19, and queryWindowSize is 50,
337
+ then documents 0 through 49 will be collected and cached. Any further
338
+ requests in that range can be satisfied via the cache. -->
339
+ <queryResultWindowSize>20</queryResultWindowSize>
340
+ <!-- Maximum number of documents to cache for any entry in the
341
+ queryResultCache. -->
342
+ <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
343
+ <!-- a newSearcher event is fired whenever a new searcher is being prepared
344
+ and there is a current searcher handling requests (aka registered).
345
+ It can be used to prime certain caches to prevent long request times for
346
+ certain requests.
347
+ -->
348
+ <!-- QuerySenderListener takes an array of NamedList and executes a
349
+ local query request for each NamedList in sequence. -->
350
+ <listener event="newSearcher" class="solr.QuerySenderListener">
351
+ <arr name="queries">
352
+ <!--
353
+ <lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
354
+ <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
355
+ <lst><str name="q">static newSearcher warming query from solrconfig.xml</str></lst>
356
+ -->
357
+ </arr>
358
+ </listener>
359
+ <!-- a firstSearcher event is fired whenever a new searcher is being
360
+ prepared but there is no current registered searcher to handle
361
+ requests or to gain autowarming data from. -->
362
+ <listener event="firstSearcher" class="solr.QuerySenderListener">
363
+ <arr name="queries">
364
+ <lst>
365
+ <str name="q">solr rocks</str>
366
+ <str name="start">0</str>
367
+ <str name="rows">10</str>
368
+ </lst>
369
+ <lst>
370
+ <str name="q">static firstSearcher warming query from solrconfig.xml</str>
371
+ </lst>
372
+ </arr>
373
+ </listener>
374
+ <!-- If a search request comes in and there is no current registered searcher,
375
+ then immediately register the still warming searcher and use it. If
376
+ "false" then all requests will block until the first searcher is done
377
+ warming. -->
378
+ <useColdSearcher>false</useColdSearcher>
379
+ <!-- Maximum number of searchers that may be warming in the background
380
+ concurrently. An error is returned if this limit is exceeded. Recommend
381
+ 1-2 for read-only slaves, higher for masters w/o cache warming. -->
382
+ <maxWarmingSearchers>2</maxWarmingSearchers>
383
+ </query>
384
+ <!--
385
+ Let the dispatch filter handler /select?qt=XXX
386
+ handleSelect=true will use consistent error handling for /select and /update
387
+ handleSelect=false will use solr1.1 style error formatting
388
+ -->
389
+ <requestDispatcher handleSelect="true">
390
+ <!--Make sure your system has some authentication before enabling remote streaming! -->
391
+ <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048000"/>
392
+ <!-- Set HTTP caching related parameters (for proxy caches and clients).
393
+
394
+ To get the behaviour of Solr 1.2 (ie: no caching related headers)
395
+ use the never304="true" option and do not specify a value for
396
+ <cacheControl>
397
+ -->
398
+ <!-- <httpCaching never304="true"> -->
399
+ <httpCaching lastModifiedFrom="openTime" etagSeed="Solr">
400
+ <!-- lastModFrom="openTime" is the default, the Last-Modified value
401
+ (and validation against If-Modified-Since requests) will all be
402
+ relative to when the current Searcher was opened.
403
+ You can change it to lastModFrom="dirLastMod" if you want the
404
+ value to exactly corrispond to when the physical index was last
405
+ modified.
406
+
407
+ etagSeed="..." is an option you can change to force the ETag
408
+ header (and validation against If-None-Match requests) to be
409
+ differnet even if the index has not changed (ie: when making
410
+ significant changes to your config file)
411
+
412
+ lastModifiedFrom and etagSeed are both ignored if you use the
413
+ never304="true" option.
414
+ -->
415
+ <!-- If you include a <cacheControl> directive, it will be used to
416
+ generate a Cache-Control header, as well as an Expires header
417
+ if the value contains "max-age="
418
+
419
+ By default, no Cache-Control header is generated.
420
+
421
+ You can use the <cacheControl> option even if you have set
422
+ never304="true"
423
+ -->
424
+ <!-- <cacheControl>max-age=30, public</cacheControl> -->
425
+ </httpCaching>
426
+ </requestDispatcher>
427
+ <!-- requestHandler plugins... incoming queries will be dispatched to the
428
+ correct handler based on the path or the qt (query type) param.
429
+ Names starting with a '/' are accessed with the a path equal to the
430
+ registered name. Names without a leading '/' are accessed with:
431
+ http://host/app/select?qt=name
432
+ If no qt is defined, the requestHandler that declares default="true"
433
+ will be used.
434
+ -->
435
+ <requestHandler name="standard" class="solr.SearchHandler" default="true">
436
+ <!-- default values for query parameters -->
437
+ <lst name="defaults">
438
+ <str name="echoParams">explicit</str>
439
+ <!--
440
+ <int name="rows">10</int>
441
+ <str name="fl">*</str>
442
+ <str name="version">2.1</str>
443
+ -->
444
+ </lst>
445
+ <arr name="last-components">
446
+ <str>spatial</str>
447
+ </arr>
448
+ </requestHandler>
449
+ <!-- Please refer to http://wiki.apache.org/solr/SolrReplication for details on configuring replication -->
450
+ <!-- remove the <lst name="master"> section if this is just a slave -->
451
+ <!-- remove the <lst name="slave"> section if this is just a master -->
452
+ <!--
453
+ <requestHandler name="/replication" class="solr.ReplicationHandler" >
454
+ <lst name="master">
455
+ <str name="replicateAfter">commit</str>
456
+ <str name="replicateAfter">startup</str>
457
+ <str name="confFiles">schema.xml,stopwords.txt</str>
458
+ </lst>
459
+ <lst name="slave">
460
+ <str name="masterUrl">http://localhost:8983/solr/replication</str>
461
+ <str name="pollInterval">00:00:60</str>
462
+ </lst>
463
+ </requestHandler>-->
464
+ <!-- DisMaxRequestHandler allows easy searching across multiple fields
465
+ for simple user-entered phrases. It's implementation is now
466
+ just the standard SearchHandler with a default query type
467
+ of "dismax".
468
+ see http://wiki.apache.org/solr/DisMaxRequestHandler
469
+ -->
470
+ <requestHandler name="dismax" class="solr.SearchHandler">
471
+ <lst name="defaults">
472
+ <str name="defType">dismax</str>
473
+ <str name="echoParams">explicit</str>
474
+ <float name="tie">0.01</float>
475
+ <str name="qf">
476
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
477
+ </str>
478
+ <str name="pf">
479
+ text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
480
+ </str>
481
+ <str name="bf">
482
+ popularity^0.5 recip(price,1,1000,1000)^0.3
483
+ </str>
484
+ <str name="fl">
485
+ id,name,price,score
486
+ </str>
487
+ <str name="mm">
488
+ 2&lt;-1 5&lt;-2 6&lt;90%
489
+ </str>
490
+ <int name="ps">100</int>
491
+ <str name="q.alt">*:*</str>
492
+ <!-- example highlighter config, enable per-query with hl=true -->
493
+ <str name="hl.fl">text features name</str>
494
+ <!-- for this field, we want no fragmenting, just highlighting -->
495
+ <str name="f.name.hl.fragsize">0</str>
496
+ <!-- instructs Solr to return the field itself if no query terms are
497
+ found -->
498
+ <str name="f.name.hl.alternateField">name</str>
499
+ <str name="f.text.hl.fragmenter">regex</str>
500
+ <!-- defined below -->
501
+ </lst>
502
+ </requestHandler>
503
+ <!-- Note how you can register the same handler multiple times with
504
+ different names (and different init parameters)
505
+ -->
506
+ <requestHandler name="partitioned" class="solr.SearchHandler">
507
+ <lst name="defaults">
508
+ <str name="defType">dismax</str>
509
+ <str name="echoParams">explicit</str>
510
+ <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
511
+ <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
512
+ <!-- This is an example of using Date Math to specify a constantly
513
+ moving date range in a config...
514
+ -->
515
+ <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
516
+ </lst>
517
+ <!-- In addition to defaults, "appends" params can be specified
518
+ to identify values which should be appended to the list of
519
+ multi-val params from the query (or the existing "defaults").
520
+
521
+ In this example, the param "fq=instock:true" will be appended to
522
+ any query time fq params the user may specify, as a mechanism for
523
+ partitioning the index, independent of any user selected filtering
524
+ that may also be desired (perhaps as a result of faceted searching).
525
+
526
+ NOTE: there is *absolutely* nothing a client can do to prevent these
527
+ "appends" values from being used, so don't use this mechanism
528
+ unless you are sure you always want it.
529
+ -->
530
+ <lst name="appends">
531
+ <str name="fq">inStock:true</str>
532
+ </lst>
533
+ <!-- "invariants" are a way of letting the Solr maintainer lock down
534
+ the options available to Solr clients. Any params values
535
+ specified here are used regardless of what values may be specified
536
+ in either the query, the "defaults", or the "appends" params.
537
+
538
+ In this example, the facet.field and facet.query params are fixed,
539
+ limiting the facets clients can use. Faceting is not turned on by
540
+ default - but if the client does specify facet=true in the request,
541
+ these are the only facets they will be able to see counts for;
542
+ regardless of what other facet.field or facet.query params they
543
+ may specify.
544
+
545
+ NOTE: there is *absolutely* nothing a client can do to prevent these
546
+ "invariants" values from being used, so don't use this mechanism
547
+ unless you are sure you always want it.
548
+ -->
549
+ <lst name="invariants">
550
+ <str name="facet.field">cat</str>
551
+ <str name="facet.field">manu_exact</str>
552
+ <str name="facet.query">price:[* TO 500]</str>
553
+ <str name="facet.query">price:[500 TO *]</str>
554
+ </lst>
555
+ </requestHandler>
556
+ <!--
557
+ Search components are registered to SolrCore and used by Search Handlers
558
+
559
+ By default, the following components are avaliable:
560
+
561
+ <searchComponent name="query" class="org.apache.solr.handler.component.QueryComponent" />
562
+ <searchComponent name="facet" class="org.apache.solr.handler.component.FacetComponent" />
563
+ <searchComponent name="mlt" class="org.apache.solr.handler.component.MoreLikeThisComponent" />
564
+ <searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
565
+ <searchComponent name="stats" class="org.apache.solr.handler.component.StatsComponent" />
566
+ <searchComponent name="debug" class="org.apache.solr.handler.component.DebugComponent" />
567
+
568
+ Default configuration in a requestHandler would look like:
569
+ <arr name="components">
570
+ <str>query</str>
571
+ <str>facet</str>
572
+ <str>mlt</str>
573
+ <str>highlight</str>
574
+ <str>stats</str>
575
+ <str>debug</str>
576
+ </arr>
577
+
578
+ If you register a searchComponent to one of the standard names, that will be used instead.
579
+ To insert components before or after the 'standard' components, use:
580
+
581
+ <arr name="first-components">
582
+ <str>myFirstComponentName</str>
583
+ </arr>
584
+
585
+ <arr name="last-components">
586
+ <str>myLastComponentName</str>
587
+ </arr>
588
+ -->
589
+ <!-- The spell check component can return a list of alternative spelling
590
+ suggestions. -->
591
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
592
+ <str name="queryAnalyzerFieldType">textSpell</str>
593
+ <lst name="spellchecker">
594
+ <str name="name">default</str>
595
+ <str name="field">name</str>
596
+ <str name="spellcheckIndexDir">./spellchecker</str>
597
+ </lst>
598
+ <!-- a spellchecker that uses a different distance measure
599
+ <lst name="spellchecker">
600
+ <str name="name">jarowinkler</str>
601
+ <str name="field">spell</str>
602
+ <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
603
+ <str name="spellcheckIndexDir">./spellchecker2</str>
604
+ </lst>
605
+ -->
606
+ <!-- a file based spell checker
607
+ <lst name="spellchecker">
608
+ <str name="classname">solr.FileBasedSpellChecker</str>
609
+ <str name="name">file</str>
610
+ <str name="sourceLocation">spellings.txt</str>
611
+ <str name="characterEncoding">UTF-8</str>
612
+ <str name="spellcheckIndexDir">./spellcheckerFile</str>
613
+ </lst>
614
+ -->
615
+ </searchComponent>
616
+ <!-- A request handler utilizing the spellcheck component.
617
+ #############################################################################
618
+ NOTE: This is purely as an example. The whole purpose of the
619
+ SpellCheckComponent is to hook it into the request handler that handles (i.e.
620
+ the standard or dismax SearchHandler) queries such that a separate request is
621
+ not needed to get suggestions.
622
+
623
+ IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS NOT WHAT YOU
624
+ WANT FOR YOUR PRODUCTION SYSTEM!
625
+ #############################################################################
626
+ -->
627
+ <requestHandler name="/spell" class="solr.SearchHandler" lazy="true">
628
+ <lst name="defaults">
629
+ <!-- omp = Only More Popular -->
630
+ <str name="spellcheck.onlyMorePopular">false</str>
631
+ <!-- exr = Extended Results -->
632
+ <str name="spellcheck.extendedResults">false</str>
633
+ <!-- The number of suggestions to return -->
634
+ <str name="spellcheck.count">1</str>
635
+ </lst>
636
+ <arr name="last-components">
637
+ <str>spellcheck</str>
638
+ </arr>
639
+ </requestHandler>
640
+ <searchComponent name="tvComponent" class="org.apache.solr.handler.component.TermVectorComponent"/>
641
+ <!-- A Req Handler for working with the tvComponent. This is purely as an example.
642
+ You will likely want to add the component to your already specified request handlers. -->
643
+ <requestHandler name="tvrh" class="org.apache.solr.handler.component.SearchHandler">
644
+ <lst name="defaults">
645
+ <bool name="tv">true</bool>
646
+ </lst>
647
+ <arr name="last-components">
648
+ <str>tvComponent</str>
649
+ </arr>
650
+ </requestHandler>
651
+ <!-- Clustering Component
652
+ http://wiki.apache.org/solr/ClusteringComponent
653
+ This relies on third party jars which are not included in the release.
654
+ To use this component (and the "/clustering" handler)
655
+ Those jars will need to be downloaded, and you'll need to set the
656
+ solr.cluster.enabled system property when running solr...
657
+ java -Dsolr.clustering.enabled=true -jar start.jar
658
+ -->
659
+ <searchComponent name="clusteringComponent" enable="${solr.clustering.enabled:false}" class="org.apache.solr.handler.clustering.ClusteringComponent">
660
+ <!-- Declare an engine -->
661
+ <lst name="engine">
662
+ <!-- The name, only one can be named "default" -->
663
+ <str name="name">default</str>
664
+ <!--
665
+ Class name of Carrot2 clustering algorithm. Currently available algorithms are:
666
+
667
+ * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
668
+ * org.carrot2.clustering.stc.STCClusteringAlgorithm
669
+
670
+ See http://project.carrot2.org/algorithms.html for the algorithm's characteristics.
671
+ -->
672
+ <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
673
+ <!--
674
+ Overriding values for Carrot2 default algorithm attributes. For a description
675
+ of all available attributes, see: http://download.carrot2.org/stable/manual/#chapter.components.
676
+ Use attribute key as name attribute of str elements below. These can be further
677
+ overridden for individual requests by specifying attribute key as request
678
+ parameter name and attribute value as parameter value.
679
+ -->
680
+ <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
681
+ </lst>
682
+ <lst name="engine">
683
+ <str name="name">stc</str>
684
+ <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
685
+ </lst>
686
+ </searchComponent>
687
+ <requestHandler name="/clustering" enable="${solr.clustering.enabled:false}" class="solr.SearchHandler">
688
+ <lst name="defaults">
689
+ <bool name="clustering">true</bool>
690
+ <str name="clustering.engine">default</str>
691
+ <bool name="clustering.results">true</bool>
692
+ <!-- The title field -->
693
+ <str name="carrot.title">name</str>
694
+ <str name="carrot.url">id</str>
695
+ <!-- The field to cluster on -->
696
+ <str name="carrot.snippet">features</str>
697
+ <!-- produce summaries -->
698
+ <bool name="carrot.produceSummary">true</bool>
699
+ <!-- the maximum number of labels per cluster -->
700
+ <!--<int name="carrot.numDescriptions">5</int>-->
701
+ <!-- produce sub clusters -->
702
+ <bool name="carrot.outputSubClusters">false</bool>
703
+ </lst>
704
+ <arr name="last-components">
705
+ <str>clusteringComponent</str>
706
+ </arr>
707
+ </requestHandler>
708
+ <!-- Solr Cell: http://wiki.apache.org/solr/ExtractingRequestHandler -->
709
+ <requestHandler name="/update/extract" class="org.apache.solr.handler.extraction.ExtractingRequestHandler" startup="lazy">
710
+ <lst name="defaults">
711
+ <!-- All the main content goes into "text"... if you need to return
712
+ the extracted text or do highlighting, use a stored field. -->
713
+ <str name="fmap.content">text</str>
714
+ <str name="lowernames">true</str>
715
+ <str name="uprefix">ignored_</str>
716
+ <!-- capture link hrefs but ignore div attributes -->
717
+ <str name="captureAttr">true</str>
718
+ <str name="fmap.a">links</str>
719
+ <str name="fmap.div">ignored_</str>
720
+ </lst>
721
+ </requestHandler>
722
+ <!-- A component to return terms and document frequency of those terms.
723
+ This component does not yet support distributed search. -->
724
+ <searchComponent name="termsComponent" class="org.apache.solr.handler.component.TermsComponent"/>
725
+ <requestHandler name="/terms" class="org.apache.solr.handler.component.SearchHandler">
726
+ <lst name="defaults">
727
+ <bool name="terms">true</bool>
728
+ </lst>
729
+ <arr name="components">
730
+ <str>termsComponent</str>
731
+ </arr>
732
+ </requestHandler>
733
+ <!-- a search component that enables you to configure the top results for
734
+ a given query regardless of the normal lucene scoring.-->
735
+ <searchComponent name="elevator" class="solr.QueryElevationComponent">
736
+ <!-- pick a fieldType to analyze queries -->
737
+ <str name="queryFieldType">string</str>
738
+ <str name="config-file">elevate.xml</str>
739
+ </searchComponent>
740
+ <!-- a request handler utilizing the elevator component -->
741
+ <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
742
+ <lst name="defaults">
743
+ <str name="echoParams">explicit</str>
744
+ </lst>
745
+ <arr name="last-components">
746
+ <str>elevator</str>
747
+ </arr>
748
+ </requestHandler>
749
+ <!-- Update request handler.
750
+
751
+ Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
752
+ the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
753
+ The response format differs from solr1.1 formatting and returns a standard error code.
754
+ To enable solr1.1 behavior, remove the /update handler or change its path
755
+ -->
756
+ <requestHandler name="/update" class="solr.XmlUpdateRequestHandler"/>
757
+ <requestHandler name="/update/javabin" class="solr.BinaryUpdateRequestHandler"/>
758
+ <!--
759
+ Analysis request handler. Since Solr 1.3. Use to return how a document is analyzed. Useful
760
+ for debugging and as a token server for other types of applications.
761
+
762
+ This is deprecated in favor of the improved DocumentAnalysisRequestHandler and FieldAnalysisRequestHandler
763
+
764
+ <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
765
+ -->
766
+ <!--
767
+ An analysis handler that provides a breakdown of the analysis process of provided docuemnts. This handler expects a
768
+ (single) content stream with the following format:
769
+
770
+ <docs>
771
+ <doc>
772
+ <field name="id">1</field>
773
+ <field name="name">The Name</field>
774
+ <field name="text">The Text Value</field>
775
+ <doc>
776
+ <doc>...</doc>
777
+ <doc>...</doc>
778
+ ...
779
+ </docs>
780
+
781
+ Note: Each document must contain a field which serves as the unique key. This key is used in the returned
782
+ response to assoicate an analysis breakdown to the analyzed document.
783
+
784
+ Like the FieldAnalysisRequestHandler, this handler also supports query analysis by
785
+ sending either an "analysis.query" or "q" request paraemter that holds the query text to be analyized. It also
786
+ supports the "analysis.showmatch" parameter which when set to true, all field tokens that match the query
787
+ tokens will be marked as a "match".
788
+ -->
789
+ <requestHandler name="/analysis/document" class="solr.DocumentAnalysisRequestHandler"/>
790
+ <!--
791
+ RequestHandler that provides much the same functionality as analysis.jsp. Provides the ability
792
+ to specify multiple field types and field names in the same request and outputs index-time and
793
+ query-time analysis for each of them.
794
+
795
+ Request parameters are:
796
+ analysis.fieldname - The field name whose analyzers are to be used
797
+ analysis.fieldtype - The field type whose analyzers are to be used
798
+ analysis.fieldvalue - The text for index-time analysis
799
+ q (or analysis.q) - The text for query time analysis
800
+ analysis.showmatch (true|false) - When set to true and when query analysis is performed, the produced
801
+ tokens of the field value analysis will be marked as "matched" for every
802
+ token that is produces by the query analysis
803
+ -->
804
+ <requestHandler name="/analysis/field" class="solr.FieldAnalysisRequestHandler"/>
805
+ <!-- CSV update handler, loaded on demand -->
806
+ <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy"/>
807
+ <!--
808
+ Admin Handlers - This will register all the standard admin RequestHandlers. Adding
809
+ this single handler is equivalent to registering:
810
+
811
+ <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
812
+ <requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
813
+ <requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
814
+ <requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
815
+ <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
816
+ <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
817
+
818
+ If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using:
819
+ <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
820
+ <lst name="invariants">
821
+ <str name="hidden">synonyms.txt</str>
822
+ <str name="hidden">anotherfile.txt</str>
823
+ </lst>
824
+ </requestHandler>
825
+ -->
826
+ <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers"/>
827
+ <!-- ping/healthcheck -->
828
+ <requestHandler name="/admin/ping" class="PingRequestHandler">
829
+ <lst name="defaults">
830
+ <str name="qt">standard</str>
831
+ <str name="q">solrpingquery</str>
832
+ <str name="echoParams">all</str>
833
+ </lst>
834
+ </requestHandler>
835
+ <!-- Echo the request contents back to the client -->
836
+ <requestHandler name="/debug/dump" class="solr.DumpRequestHandler">
837
+ <lst name="defaults">
838
+ <str name="echoParams">explicit</str>
839
+ <!-- for all params (including the default etc) use: 'all' -->
840
+ <str name="echoHandler">true</str>
841
+ </lst>
842
+ </requestHandler>
843
+ <highlighting>
844
+ <!-- Configure the standard fragmenter -->
845
+ <!-- This could most likely be commented out in the "default" case -->
846
+ <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
847
+ <lst name="defaults">
848
+ <int name="hl.fragsize">100</int>
849
+ </lst>
850
+ </fragmenter>
851
+ <!-- A regular-expression-based fragmenter (f.i., for sentence extraction) -->
852
+ <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
853
+ <lst name="defaults">
854
+ <!-- slightly smaller fragsizes work better because of slop -->
855
+ <int name="hl.fragsize">70</int>
856
+ <!-- allow 50% slop on fragment sizes -->
857
+ <float name="hl.regex.slop">0.5</float>
858
+ <!-- a basic sentence pattern -->
859
+ <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
860
+ </lst>
861
+ </fragmenter>
862
+ <!-- Configure the standard formatter -->
863
+ <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
864
+ <lst name="defaults">
865
+ <str name="hl.simple.pre"><![CDATA[<em>]]></str>
866
+ <str name="hl.simple.post"><![CDATA[</em>]]></str>
867
+ </lst>
868
+ </formatter>
869
+ </highlighting>
870
+ <!-- An example dedup update processor that creates the "id" field on the fly
871
+ based on the hash code of some other fields. This example has overwriteDupes
872
+ set to false since we are using the id field as the signatureField and Solr
873
+ will maintain uniqueness based on that anyway.
874
+
875
+ You have to link the chain to an update handler above to use it ie:
876
+ <requestHandler name="/update "class="solr.XmlUpdateRequestHandler">
877
+ <lst name="defaults">
878
+ <str name="update.processor">dedupe</str>
879
+ </lst>
880
+ </requestHandler>
881
+ -->
882
+ <!--
883
+ <updateRequestProcessorChain name="dedupe">
884
+ <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
885
+ <bool name="enabled">true</bool>
886
+ <str name="signatureField">id</str>
887
+ <bool name="overwriteDupes">false</bool>
888
+ <str name="fields">name,features,cat</str>
889
+ <str name="signatureClass">org.apache.solr.update.processor.Lookup3Signature</str>
890
+ </processor>
891
+ <processor class="solr.LogUpdateProcessorFactory" />
892
+ <processor class="solr.RunUpdateProcessorFactory" />
893
+ </updateRequestProcessorChain>
894
+ -->
895
+ <!-- queryResponseWriter plugins... query responses will be written using the
896
+ writer specified by the 'wt' request parameter matching the name of a registered
897
+ writer.
898
+ The "default" writer is the default and will be used if 'wt' is not specified
899
+ in the request. XMLResponseWriter will be used if nothing is specified here.
900
+ The json, python, and ruby writers are also available by default.
901
+
902
+ <queryResponseWriter name="xml" class="org.apache.solr.request.XMLResponseWriter" default="true"/>
903
+ <queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
904
+ <queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>
905
+ <queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
906
+ <queryResponseWriter name="php" class="org.apache.solr.request.PHPResponseWriter"/>
907
+ <queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>
908
+
909
+ <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
910
+ -->
911
+ <!-- XSLT response writer transforms the XML output by any xslt file found
912
+ in Solr's conf/xslt directory. Changes to xslt files are checked for
913
+ every xsltCacheLifetimeSeconds.
914
+ -->
915
+ <queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
916
+ <int name="xsltCacheLifetimeSeconds">5</int>
917
+ </queryResponseWriter>
918
+ <!-- example of registering a query parser
919
+ <queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
920
+ -->
921
+ <!-- example of registering a custom function parser
922
+ <valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />
923
+ -->
924
+ <!-- config for the admin interface -->
925
+ <admin>
926
+ <defaultQuery>solr</defaultQuery>
927
+ <!-- configure a healthcheck file for servers behind a loadbalancer
928
+ <healthcheck type="file">server-enabled</healthcheck>
929
+ -->
930
+ </admin>
931
+ <searchComponent name="spatial" class="me.outofti.solrspatiallight.SpatialQueryComponent"/>
932
+ <requestHandler class="solr.MoreLikeThisHandler" name="/mlt">
933
+ <lst name="defaults">
934
+ <str name="mlt.mintf">1</str>
935
+ <str name="mlt.mindf">2</str>
936
+ </lst>
937
+ </requestHandler>
938
+ </config>