solrsrv 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. data/.document +5 -0
  2. data/.gitignore +11 -0
  3. data/LICENSE +20 -0
  4. data/README.md +27 -0
  5. data/Rakefile +28 -0
  6. data/VERSION +1 -0
  7. data/apache-solr-1.4.0/README.txt +42 -0
  8. data/apache-solr-1.4.0/etc/jetty.xml +212 -0
  9. data/apache-solr-1.4.0/etc/webdefault.xml +379 -0
  10. data/apache-solr-1.4.0/example-DIH/README.txt +43 -0
  11. data/apache-solr-1.4.0/example-DIH/hsqldb/ex.backup +0 -0
  12. data/apache-solr-1.4.0/example-DIH/hsqldb/ex.data +0 -0
  13. data/apache-solr-1.4.0/example-DIH/hsqldb/ex.log +2 -0
  14. data/apache-solr-1.4.0/example-DIH/hsqldb/ex.properties +17 -0
  15. data/apache-solr-1.4.0/example-DIH/hsqldb/ex.script +12 -0
  16. data/apache-solr-1.4.0/example-DIH/solr/db/conf/admin-extra.html +31 -0
  17. data/apache-solr-1.4.0/example-DIH/solr/db/conf/db-data-config.xml +31 -0
  18. data/apache-solr-1.4.0/example-DIH/solr/db/conf/elevate.xml +36 -0
  19. data/apache-solr-1.4.0/example-DIH/solr/db/conf/protwords.txt +21 -0
  20. data/apache-solr-1.4.0/example-DIH/solr/db/conf/schema.xml +356 -0
  21. data/apache-solr-1.4.0/example-DIH/solr/db/conf/scripts.conf +24 -0
  22. data/apache-solr-1.4.0/example-DIH/solr/db/conf/solrconfig.xml +705 -0
  23. data/apache-solr-1.4.0/example-DIH/solr/db/conf/stopwords.txt +58 -0
  24. data/apache-solr-1.4.0/example-DIH/solr/db/conf/synonyms.txt +31 -0
  25. data/apache-solr-1.4.0/example-DIH/solr/db/conf/xslt/example.xsl +132 -0
  26. data/apache-solr-1.4.0/example-DIH/solr/db/conf/xslt/example_atom.xsl +63 -0
  27. data/apache-solr-1.4.0/example-DIH/solr/db/conf/xslt/example_rss.xsl +62 -0
  28. data/apache-solr-1.4.0/example-DIH/solr/db/conf/xslt/luke.xsl +345 -0
  29. data/apache-solr-1.4.0/example-DIH/solr/db/lib/hsqldb-1.8.0.10.jar +0 -0
  30. data/apache-solr-1.4.0/example-DIH/solr/mail/conf/data-config.xml +11 -0
  31. data/apache-solr-1.4.0/example-DIH/solr/mail/conf/protwords.txt +21 -0
  32. data/apache-solr-1.4.0/example-DIH/solr/mail/conf/schema.xml +370 -0
  33. data/apache-solr-1.4.0/example-DIH/solr/mail/conf/solrconfig.xml +807 -0
  34. data/apache-solr-1.4.0/example-DIH/solr/mail/conf/stopwords.txt +58 -0
  35. data/apache-solr-1.4.0/example-DIH/solr/mail/conf/synonyms.txt +31 -0
  36. data/apache-solr-1.4.0/example-DIH/solr/rss/conf/admin-extra.html +31 -0
  37. data/apache-solr-1.4.0/example-DIH/solr/rss/conf/elevate.xml +36 -0
  38. data/apache-solr-1.4.0/example-DIH/solr/rss/conf/protwords.txt +21 -0
  39. data/apache-solr-1.4.0/example-DIH/solr/rss/conf/rss-data-config.xml +26 -0
  40. data/apache-solr-1.4.0/example-DIH/solr/rss/conf/schema.xml +316 -0
  41. data/apache-solr-1.4.0/example-DIH/solr/rss/conf/scripts.conf +24 -0
  42. data/apache-solr-1.4.0/example-DIH/solr/rss/conf/solrconfig.xml +704 -0
  43. data/apache-solr-1.4.0/example-DIH/solr/rss/conf/stopwords.txt +58 -0
  44. data/apache-solr-1.4.0/example-DIH/solr/rss/conf/synonyms.txt +31 -0
  45. data/apache-solr-1.4.0/example-DIH/solr/solr.xml +8 -0
  46. data/apache-solr-1.4.0/exampledocs/books.csv +11 -0
  47. data/apache-solr-1.4.0/exampledocs/hd.xml +48 -0
  48. data/apache-solr-1.4.0/exampledocs/ipod_other.xml +52 -0
  49. data/apache-solr-1.4.0/exampledocs/ipod_video.xml +36 -0
  50. data/apache-solr-1.4.0/exampledocs/mem.xml +60 -0
  51. data/apache-solr-1.4.0/exampledocs/monitor.xml +31 -0
  52. data/apache-solr-1.4.0/exampledocs/monitor2.xml +30 -0
  53. data/apache-solr-1.4.0/exampledocs/mp500.xml +39 -0
  54. data/apache-solr-1.4.0/exampledocs/payload.xml +57 -0
  55. data/apache-solr-1.4.0/exampledocs/post.jar +0 -0
  56. data/apache-solr-1.4.0/exampledocs/post.sh +28 -0
  57. data/apache-solr-1.4.0/exampledocs/sd500.xml +34 -0
  58. data/apache-solr-1.4.0/exampledocs/solr.xml +38 -0
  59. data/apache-solr-1.4.0/exampledocs/test_utf8.sh +83 -0
  60. data/apache-solr-1.4.0/exampledocs/utf8-example.xml +42 -0
  61. data/apache-solr-1.4.0/exampledocs/vidcard.xml +54 -0
  62. data/apache-solr-1.4.0/lib/jetty-6.1.3.jar +0 -0
  63. data/apache-solr-1.4.0/lib/jetty-util-6.1.3.jar +0 -0
  64. data/apache-solr-1.4.0/lib/jsp-2.1/ant-1.6.5.jar +0 -0
  65. data/apache-solr-1.4.0/lib/jsp-2.1/core-3.1.1.jar +0 -0
  66. data/apache-solr-1.4.0/lib/jsp-2.1/jsp-2.1.jar +0 -0
  67. data/apache-solr-1.4.0/lib/jsp-2.1/jsp-api-2.1.jar +0 -0
  68. data/apache-solr-1.4.0/lib/servlet-api-2.5-6.1.3.jar +0 -0
  69. data/apache-solr-1.4.0/logs/.gitkeep +0 -0
  70. data/apache-solr-1.4.0/multicore/README.txt +3 -0
  71. data/apache-solr-1.4.0/multicore/core0/conf/schema.xml +41 -0
  72. data/apache-solr-1.4.0/multicore/core0/conf/solrconfig.xml +40 -0
  73. data/apache-solr-1.4.0/multicore/core1/conf/schema.xml +41 -0
  74. data/apache-solr-1.4.0/multicore/core1/conf/solrconfig.xml +40 -0
  75. data/apache-solr-1.4.0/multicore/exampledocs/ipod_other.xml +34 -0
  76. data/apache-solr-1.4.0/multicore/exampledocs/ipod_video.xml +22 -0
  77. data/apache-solr-1.4.0/multicore/solr.xml +35 -0
  78. data/apache-solr-1.4.0/solr/README.txt +54 -0
  79. data/apache-solr-1.4.0/solr/conf/admin-extra.html +31 -0
  80. data/apache-solr-1.4.0/solr/conf/elevate.xml +36 -0
  81. data/apache-solr-1.4.0/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  82. data/apache-solr-1.4.0/solr/conf/protwords.txt +21 -0
  83. data/apache-solr-1.4.0/solr/conf/schema.xml +569 -0
  84. data/apache-solr-1.4.0/solr/conf/scripts.conf +24 -0
  85. data/apache-solr-1.4.0/solr/conf/solrconfig.xml +1033 -0
  86. data/apache-solr-1.4.0/solr/conf/spellings.txt +2 -0
  87. data/apache-solr-1.4.0/solr/conf/stopwords.txt +58 -0
  88. data/apache-solr-1.4.0/solr/conf/synonyms.txt +31 -0
  89. data/apache-solr-1.4.0/solr/conf/xslt/example.xsl +132 -0
  90. data/apache-solr-1.4.0/solr/conf/xslt/example_atom.xsl +67 -0
  91. data/apache-solr-1.4.0/solr/conf/xslt/example_rss.xsl +66 -0
  92. data/apache-solr-1.4.0/solr/conf/xslt/luke.xsl +337 -0
  93. data/apache-solr-1.4.0/start.jar +0 -0
  94. data/apache-solr-1.4.0/webapps/solr.war +0 -0
  95. data/bin/solrsrv +39 -0
  96. data/lib/generators/solrsrv/update_config/templates/solrsrv.yml +17 -0
  97. data/lib/generators/solrsrv/update_config/update_config_generator.rb +17 -0
  98. data/lib/solrsrv/engine.rb +6 -0
  99. data/lib/solrsrv.rb +5 -0
  100. data/lib/tasks/solrsrv.rake +49 -0
  101. data/solrsrv.gemspec +143 -0
  102. metadata +184 -0
@@ -0,0 +1,807 @@
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
+ <config>
20
+ <!-- Set this to 'false' if you want solr to continue working after it has
21
+ encountered an severe configuration error. In a production environment,
22
+ you may want solr to keep working even if one handler is mis-configured.
23
+
24
+ You may also set this to false using by setting the system property:
25
+ -Dsolr.abortOnConfigurationError=false
26
+ -->
27
+ <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
28
+
29
+ <lib dir="../../../../contrib/dataimporthandler/lib/" regex=".*jar$" />
30
+ <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-extras-\d.*\.jar" />
31
+
32
+ <indexDefaults>
33
+ <!-- Values here affect all index writers and act as a default unless overridden. -->
34
+ <useCompoundFile>false</useCompoundFile>
35
+
36
+ <mergeFactor>10</mergeFactor>
37
+ <!--
38
+ If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
39
+
40
+ -->
41
+ <!--<maxBufferedDocs>1000</maxBufferedDocs>-->
42
+ <!-- Tell Lucene when to flush documents to disk.
43
+ Giving Lucene more memory for indexing means faster indexing at the cost of more RAM
44
+
45
+ If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
46
+
47
+ -->
48
+ <ramBufferSizeMB>32</ramBufferSizeMB>
49
+ <maxMergeDocs>2147483647</maxMergeDocs>
50
+ <maxFieldLength>10000</maxFieldLength>
51
+ <writeLockTimeout>1000</writeLockTimeout>
52
+ <commitLockTimeout>10000</commitLockTimeout>
53
+
54
+ <!--
55
+ Expert: Turn on Lucene's auto commit capability.
56
+ This causes intermediate segment flushes to write a new lucene
57
+ index descriptor, enabling it to be opened by an external
58
+ IndexReader.
59
+ NOTE: Despite the name, this value does not have any relation to Solr's autoCommit functionality
60
+ -->
61
+ <!--<luceneAutoCommit>false</luceneAutoCommit>-->
62
+ <!--
63
+ Expert:
64
+ The Merge Policy in Lucene controls how merging is handled by Lucene. The default in 2.3 is the LogByteSizeMergePolicy, previous
65
+ versions used LogDocMergePolicy.
66
+
67
+ LogByteSizeMergePolicy chooses segments to merge based on their size. The Lucene 2.2 default, LogDocMergePolicy chose when
68
+ to merge based on number of documents
69
+
70
+ Other implementations of MergePolicy must have a no-argument constructor
71
+ -->
72
+ <!--<mergePolicy>org.apache.lucene.index.LogByteSizeMergePolicy</mergePolicy>-->
73
+
74
+ <!--
75
+ Expert:
76
+ The Merge Scheduler in Lucene controls how merges are performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
77
+ can perform merges in the background using separate threads. The SerialMergeScheduler (Lucene 2.2 default) does not.
78
+ -->
79
+ <!--<mergeScheduler>org.apache.lucene.index.ConcurrentMergeScheduler</mergeScheduler>-->
80
+
81
+ <!--
82
+ This option specifies which Lucene LockFactory implementation to use.
83
+
84
+ single = SingleInstanceLockFactory - suggested for a read-only index
85
+ or when there is no possibility of another process trying
86
+ to modify the index.
87
+ native = NativeFSLockFactory
88
+ simple = SimpleFSLockFactory
89
+
90
+ (For backwards compatibility with Solr 1.2, 'simple' is the default
91
+ if not specified.)
92
+ -->
93
+ <lockType>single</lockType>
94
+ </indexDefaults>
95
+
96
+ <mainIndex>
97
+ <!-- options specific to the main on-disk lucene index -->
98
+ <useCompoundFile>false</useCompoundFile>
99
+ <ramBufferSizeMB>32</ramBufferSizeMB>
100
+ <mergeFactor>10</mergeFactor>
101
+ <!-- Deprecated -->
102
+ <!--<maxBufferedDocs>1000</maxBufferedDocs>-->
103
+ <maxMergeDocs>2147483647</maxMergeDocs>
104
+ <maxFieldLength>10000</maxFieldLength>
105
+
106
+ <!-- If true, unlock any held write or commit locks on startup.
107
+ This defeats the locking mechanism that allows multiple
108
+ processes to safely access a lucene index, and should be
109
+ used with care.
110
+ This is not needed if lock type is 'none' or 'single'
111
+ -->
112
+ <unlockOnStartup>false</unlockOnStartup>
113
+
114
+ <!--
115
+ Custom deletion policies can specified here. The class must
116
+ implement org.apache.lucene.index.IndexDeletionPolicy.
117
+
118
+ http://lucene.apache.org/java/2_3_2/api/org/apache/lucene/index/IndexDeletionPolicy.html
119
+
120
+ The standard Solr IndexDeletionPolicy implementation supports deleting
121
+ index commit points on number of commits, age of commit point and
122
+ optimized status.
123
+
124
+ The latest commit point should always be preserved regardless
125
+ of the criteria.
126
+ -->
127
+ <deletionPolicy class="solr.SolrDeletionPolicy">
128
+ <!-- Keep only optimized commit points -->
129
+ <str name="keepOptimizedOnly">false</str>
130
+ <!-- The maximum number of commit points to be kept -->
131
+ <str name="maxCommitsToKeep">1</str>
132
+ <!--
133
+ Delete all commit points once they have reached the given age.
134
+ Supports DateMathParser syntax e.g.
135
+
136
+ <str name="maxCommitAge">30MINUTES</str>
137
+ <str name="maxCommitAge">1DAY</str>
138
+ -->
139
+ </deletionPolicy>
140
+
141
+ </mainIndex>
142
+
143
+ <!-- Enables JMX if and only if an existing MBeanServer is found, use
144
+ this if you want to configure JMX through JVM parameters. Remove
145
+ this to disable exposing Solr configuration and statistics to JMX.
146
+
147
+ If you want to connect to a particular server, specify the agentId
148
+ e.g. <jmx agentId="myAgent" />
149
+
150
+ If you want to start a new MBeanServer, specify the serviceUrl
151
+ e.g <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr" />
152
+
153
+ For more details see http://wiki.apache.org/solr/SolrJmx
154
+ -->
155
+ <jmx />
156
+
157
+ <!-- the default high-performance update handler -->
158
+ <updateHandler class="solr.DirectUpdateHandler2">
159
+
160
+ <!-- A prefix of "solr." for class names is an alias that
161
+ causes solr to search appropriate packages, including
162
+ org.apache.solr.(search|update|request|core|analysis)
163
+ -->
164
+
165
+ <!-- Perform a <commit/> automatically under certain conditions:
166
+ maxDocs - number of updates since last commit is greater than this
167
+ maxTime - oldest uncommited update (in ms) is this long ago
168
+ <autoCommit>
169
+ <maxDocs>10000</maxDocs>
170
+ <maxTime>1000</maxTime>
171
+ </autoCommit>
172
+ -->
173
+
174
+ <!-- The RunExecutableListener executes an external command.
175
+ exe - the name of the executable to run
176
+ dir - dir to use as the current working directory. default="."
177
+ wait - the calling thread waits until the executable returns. default="true"
178
+ args - the arguments to pass to the program. default=nothing
179
+ env - environment variables to set. default=nothing
180
+ -->
181
+ <!-- A postCommit event is fired after every commit or optimize command
182
+ <listener event="postCommit" class="solr.RunExecutableListener">
183
+ <str name="exe">solr/bin/snapshooter</str>
184
+ <str name="dir">.</str>
185
+ <bool name="wait">true</bool>
186
+ <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
187
+ <arr name="env"> <str>MYVAR=val1</str> </arr>
188
+ </listener>
189
+ -->
190
+ <!-- A postOptimize event is fired only after every optimize command, useful
191
+ in conjunction with index distribution to only distribute optimized indicies
192
+ <listener event="postOptimize" class="solr.RunExecutableListener">
193
+ <str name="exe">snapshooter</str>
194
+ <str name="dir">solr/bin</str>
195
+ <bool name="wait">true</bool>
196
+ </listener>
197
+ -->
198
+
199
+ </updateHandler>
200
+
201
+
202
+ <query>
203
+ <!-- Maximum number of clauses in a boolean query... can affect
204
+ range or prefix queries that expand to big boolean
205
+ queries. An exception is thrown if exceeded. -->
206
+ <maxBooleanClauses>1024</maxBooleanClauses>
207
+
208
+
209
+ <!-- There are two implementations of cache available for Solr,
210
+ LRUCache, based on a synchronized LinkedHashMap, and
211
+ FastLRUCache, based on a ConcurrentHashMap. FastLRUCache has faster gets
212
+ and slower puts in single threaded operation and thus is generally faster
213
+ than LRUCache when the hit ratio of the cache is high (> 75%), and may be
214
+ faster under other scenarios on multi-cpu systems. -->
215
+ <!-- Cache used by SolrIndexSearcher for filters (DocSets),
216
+ unordered sets of *all* documents that match a query.
217
+ When a new searcher is opened, its caches may be prepopulated
218
+ or "autowarmed" using data from caches in the old searcher.
219
+ autowarmCount is the number of items to prepopulate. For LRUCache,
220
+ the autowarmed items will be the most recently accessed items.
221
+ Parameters:
222
+ class - the SolrCache implementation LRUCache or FastLRUCache
223
+ size - the maximum number of entries in the cache
224
+ initialSize - the initial capacity (number of entries) of
225
+ the cache. (seel java.util.HashMap)
226
+ autowarmCount - the number of entries to prepopulate from
227
+ and old cache.
228
+ -->
229
+ <filterCache
230
+ class="solr.FastLRUCache"
231
+ size="512"
232
+ initialSize="512"
233
+ autowarmCount="128"/>
234
+
235
+ <!-- Cache used to hold field values that are quickly accessible
236
+ by document id. The fieldValueCache is created by default
237
+ even if not configured here.
238
+ <fieldValueCache
239
+ class="solr.FastLRUCache"
240
+ size="512"
241
+ autowarmCount="128"
242
+ showItems="32"
243
+ />
244
+ -->
245
+
246
+ <!-- queryResultCache caches results of searches - ordered lists of
247
+ document ids (DocList) based on a query, a sort, and the range
248
+ of documents requested. -->
249
+ <queryResultCache
250
+ class="solr.LRUCache"
251
+ size="512"
252
+ initialSize="512"
253
+ autowarmCount="32"/>
254
+
255
+ <!-- documentCache caches Lucene Document objects (the stored fields for each document).
256
+ Since Lucene internal document ids are transient, this cache will not be autowarmed. -->
257
+ <documentCache
258
+ class="solr.LRUCache"
259
+ size="512"
260
+ initialSize="512"
261
+ autowarmCount="0"/>
262
+
263
+ <!-- If true, stored fields that are not requested will be loaded lazily.
264
+
265
+ This can result in a significant speed improvement if the usual case is to
266
+ not load all stored fields, especially if the skipped fields are large compressed
267
+ text fields.
268
+ -->
269
+ <enableLazyFieldLoading>true</enableLazyFieldLoading>
270
+
271
+ <!-- Example of a generic cache. These caches may be accessed by name
272
+ through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
273
+ The purpose is to enable easy caching of user/application level data.
274
+ The regenerator argument should be specified as an implementation
275
+ of solr.search.CacheRegenerator if autowarming is desired. -->
276
+ <!--
277
+ <cache name="myUserCache"
278
+ class="solr.LRUCache"
279
+ size="4096"
280
+ initialSize="1024"
281
+ autowarmCount="1024"
282
+ regenerator="org.mycompany.mypackage.MyRegenerator"
283
+ />
284
+ -->
285
+
286
+ <!-- An optimization that attempts to use a filter to satisfy a search.
287
+ If the requested sort does not include score, then the filterCache
288
+ will be checked for a filter matching the query. If found, the filter
289
+ will be used as the source of document ids, and then the sort will be
290
+ applied to that.
291
+ <useFilterForSortedQuery>true</useFilterForSortedQuery>
292
+ -->
293
+
294
+ <!-- An optimization for use with the queryResultCache. When a search
295
+ is requested, a superset of the requested number of document ids
296
+ are collected. For example, if a search for a particular query
297
+ requests matching documents 10 through 19, and queryWindowSize is 50,
298
+ then documents 0 through 49 will be collected and cached. Any further
299
+ requests in that range can be satisfied via the cache. -->
300
+ <queryResultWindowSize>50</queryResultWindowSize>
301
+
302
+ <!-- Maximum number of documents to cache for any entry in the
303
+ queryResultCache. -->
304
+ <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
305
+
306
+ <!-- This entry enables an int hash representation for filters (DocSets)
307
+ when the number of items in the set is less than maxSize. For smaller
308
+ sets, this representation is more memory efficient, more efficient to
309
+ iterate over, and faster to take intersections. -->
310
+ <HashDocSet maxSize="3000" loadFactor="0.75"/>
311
+
312
+ <!-- a newSearcher event is fired whenever a new searcher is being prepared
313
+ and there is a current searcher handling requests (aka registered). -->
314
+ <!-- QuerySenderListener takes an array of NamedList and executes a
315
+ local query request for each NamedList in sequence. -->
316
+ <listener event="newSearcher" class="solr.QuerySenderListener">
317
+ <arr name="queries">
318
+ <lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
319
+ <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
320
+ <lst><str name="q">static newSearcher warming query from solrconfig.xml</str></lst>
321
+ </arr>
322
+ </listener>
323
+
324
+ <!-- a firstSearcher event is fired whenever a new searcher is being
325
+ prepared but there is no current registered searcher to handle
326
+ requests or to gain autowarming data from. -->
327
+ <listener event="firstSearcher" class="solr.QuerySenderListener">
328
+ <arr name="queries">
329
+ <lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
330
+ <lst><str name="q">static firstSearcher warming query from solrconfig.xml</str></lst>
331
+ </arr>
332
+ </listener>
333
+
334
+ <!-- If a search request comes in and there is no current registered searcher,
335
+ then immediately register the still warming searcher and use it. If
336
+ "false" then all requests will block until the first searcher is done
337
+ warming. -->
338
+ <useColdSearcher>false</useColdSearcher>
339
+
340
+ <!-- Maximum number of searchers that may be warming in the background
341
+ concurrently. An error is returned if this limit is exceeded. Recommend
342
+ 1-2 for read-only slaves, higher for masters w/o cache warming. -->
343
+ <maxWarmingSearchers>2</maxWarmingSearchers>
344
+
345
+ </query>
346
+
347
+ <!--
348
+ Let the dispatch filter handler /select?qt=XXX
349
+ handleSelect=true will use consistent error handling for /select and /update
350
+ handleSelect=false will use solr1.1 style error formatting
351
+ -->
352
+ <requestDispatcher handleSelect="true" >
353
+ <!--Make sure your system has some authentication before enabling remote streaming! -->
354
+ <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048000" />
355
+
356
+ <!-- Set HTTP caching related parameters (for proxy caches and clients).
357
+
358
+ To get the behaviour of Solr 1.2 (ie: no caching related headers)
359
+ use the never304="true" option and do not specify a value for
360
+ <cacheControl>
361
+ -->
362
+ <!-- <httpCaching never304="true"> -->
363
+ <httpCaching lastModifiedFrom="openTime"
364
+ etagSeed="Solr">
365
+ <!-- lastModFrom="openTime" is the default, the Last-Modified value
366
+ (and validation against If-Modified-Since requests) will all be
367
+ relative to when the current Searcher was opened.
368
+ You can change it to lastModFrom="dirLastMod" if you want the
369
+ value to exactly corrispond to when the physical index was last
370
+ modified.
371
+
372
+ etagSeed="..." is an option you can change to force the ETag
373
+ header (and validation against If-None-Match requests) to be
374
+ differnet even if the index has not changed (ie: when making
375
+ significant changes to your config file)
376
+
377
+ lastModifiedFrom and etagSeed are both ignored if you use the
378
+ never304="true" option.
379
+ -->
380
+ <!-- If you include a <cacheControl> directive, it will be used to
381
+ generate a Cache-Control header, as well as an Expires header
382
+ if the value contains "max-age="
383
+
384
+ By default, no Cache-Control header is generated.
385
+
386
+ You can use the <cacheControl> option even if you have set
387
+ never304="true"
388
+ -->
389
+ <!-- <cacheControl>max-age=30, public</cacheControl> -->
390
+ </httpCaching>
391
+ </requestDispatcher>
392
+
393
+
394
+ <!-- requestHandler plugins... incoming queries will be dispatched to the
395
+ correct handler based on the path or the qt (query type) param.
396
+ Names starting with a '/' are accessed with the a path equal to the
397
+ registered name. Names without a leading '/' are accessed with:
398
+ http://host/app/select?qt=name
399
+ If no qt is defined, the requestHandler that declares default="true"
400
+ will be used.
401
+ -->
402
+ <requestHandler name="standard" class="solr.SearchHandler" default="true">
403
+ <!-- default values for query parameters -->
404
+ <lst name="defaults">
405
+ <str name="echoParams">explicit</str>
406
+ <!--
407
+ <int name="rows">10</int>
408
+ <str name="fl">*</str>
409
+ <str name="version">2.1</str>
410
+ -->
411
+ </lst>
412
+ </requestHandler>
413
+
414
+ <!-- Please refer to http://wiki.apache.org/solr/SolrReplication for details on configuring replication -->
415
+ <!--Master config-->
416
+ <!--
417
+ <requestHandler name="/replication" class="solr.ReplicationHandler" >
418
+ <lst name="master">
419
+ <str name="replicateAfter">commit</str>
420
+ <str name="confFiles">schema.xml,stopwords.txt</str>
421
+ </lst>
422
+ </requestHandler>
423
+ -->
424
+ <!-- Slave config-->
425
+ <!--
426
+ <requestHandler name="/replication" class="solr.ReplicationHandler">
427
+ <lst name="slave">
428
+ <str name="masterUrl">http://localhost:8983/solr/replication</str>
429
+ <str name="pollInterval">00:00:60</str>
430
+ </lst>
431
+ </requestHandler>
432
+ -->
433
+
434
+ <!-- DisMaxRequestHandler allows easy searching across multiple fields
435
+ for simple user-entered phrases. It's implementation is now
436
+ just the standard SearchHandler with a default query type
437
+ of "dismax".
438
+ see http://wiki.apache.org/solr/DisMaxRequestHandler
439
+ -->
440
+ <requestHandler name="dismax" class="solr.SearchHandler" >
441
+ <lst name="defaults">
442
+ <str name="defType">dismax</str>
443
+ <str name="echoParams">explicit</str>
444
+ <float name="tie">0.01</float>
445
+ <str name="qf">
446
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
447
+ </str>
448
+ <str name="pf">
449
+ text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
450
+ </str>
451
+ <str name="bf">
452
+ ord(popularity)^0.5 recip(rord(price),1,1000,1000)^0.3
453
+ </str>
454
+ <str name="fl">
455
+ id,name,price,score
456
+ </str>
457
+ <str name="mm">
458
+ 2&lt;-1 5&lt;-2 6&lt;90%
459
+ </str>
460
+ <int name="ps">100</int>
461
+ <str name="q.alt">*:*</str>
462
+ <!-- example highlighter config, enable per-query with hl=true -->
463
+ <str name="hl.fl">text features name</str>
464
+ <!-- for this field, we want no fragmenting, just highlighting -->
465
+ <str name="f.name.hl.fragsize">0</str>
466
+ <!-- instructs Solr to return the field itself if no query terms are
467
+ found -->
468
+ <str name="f.name.hl.alternateField">name</str>
469
+ <str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
470
+ </lst>
471
+ </requestHandler>
472
+
473
+ <!-- Note how you can register the same handler multiple times with
474
+ different names (and different init parameters)
475
+ -->
476
+ <requestHandler name="partitioned" class="solr.SearchHandler" >
477
+ <lst name="defaults">
478
+ <str name="defType">dismax</str>
479
+ <str name="echoParams">explicit</str>
480
+ <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
481
+ <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
482
+ <!-- This is an example of using Date Math to specify a constantly
483
+ moving date range in a config...
484
+ -->
485
+ <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
486
+ </lst>
487
+ <!-- In addition to defaults, "appends" params can be specified
488
+ to identify values which should be appended to the list of
489
+ multi-val params from the query (or the existing "defaults").
490
+
491
+ In this example, the param "fq=instock:true" will be appended to
492
+ any query time fq params the user may specify, as a mechanism for
493
+ partitioning the index, independent of any user selected filtering
494
+ that may also be desired (perhaps as a result of faceted searching).
495
+
496
+ NOTE: there is *absolutely* nothing a client can do to prevent these
497
+ "appends" values from being used, so don't use this mechanism
498
+ unless you are sure you always want it.
499
+ -->
500
+ <lst name="appends">
501
+ <str name="fq">inStock:true</str>
502
+ </lst>
503
+ <!-- "invariants" are a way of letting the Solr maintainer lock down
504
+ the options available to Solr clients. Any params values
505
+ specified here are used regardless of what values may be specified
506
+ in either the query, the "defaults", or the "appends" params.
507
+
508
+ In this example, the facet.field and facet.query params are fixed,
509
+ limiting the facets clients can use. Faceting is not turned on by
510
+ default - but if the client does specify facet=true in the request,
511
+ these are the only facets they will be able to see counts for;
512
+ regardless of what other facet.field or facet.query params they
513
+ may specify.
514
+
515
+ NOTE: there is *absolutely* nothing a client can do to prevent these
516
+ "invariants" values from being used, so don't use this mechanism
517
+ unless you are sure you always want it.
518
+ -->
519
+ <lst name="invariants">
520
+ <str name="facet.field">cat</str>
521
+ <str name="facet.field">manu_exact</str>
522
+ <str name="facet.query">price:[* TO 500]</str>
523
+ <str name="facet.query">price:[500 TO *]</str>
524
+ </lst>
525
+ </requestHandler>
526
+
527
+
528
+ <!--
529
+ Search components are registered to SolrCore and used by Search Handlers
530
+
531
+ By default, the following components are avaliable:
532
+
533
+ <searchComponent name="query" class="org.apache.solr.handler.component.QueryComponent" />
534
+ <searchComponent name="facet" class="org.apache.solr.handler.component.FacetComponent" />
535
+ <searchComponent name="mlt" class="org.apache.solr.handler.component.MoreLikeThisComponent" />
536
+ <searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
537
+ <searchComponent name="stats" class="org.apache.solr.handler.component.StatsComponent" />
538
+ <searchComponent name="debug" class="org.apache.solr.handler.component.DebugComponent" />
539
+
540
+ Default configuration in a requestHandler would look like:
541
+ <arr name="components">
542
+ <str>query</str>
543
+ <str>facet</str>
544
+ <str>mlt</str>
545
+ <str>highlight</str>
546
+ <str>stats</str>
547
+ <str>debug</str>
548
+ </arr>
549
+
550
+ If you register a searchComponent to one of the standard names, that will be used instead.
551
+ To insert components before or after the 'standard' components, use:
552
+
553
+ <arr name="first-components">
554
+ <str>myFirstComponentName</str>
555
+ </arr>
556
+
557
+ <arr name="last-components">
558
+ <str>myLastComponentName</str>
559
+ </arr>
560
+ -->
561
+
562
+ <!-- The spell check component can return a list of alternative spelling
563
+ suggestions. -->
564
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
565
+
566
+ <str name="queryAnalyzerFieldType">textSpell</str>
567
+
568
+ <lst name="spellchecker">
569
+ <str name="name">default</str>
570
+ <str name="field">spell</str>
571
+ <str name="spellcheckIndexDir">./spellchecker1</str>
572
+
573
+ </lst>
574
+ <lst name="spellchecker">
575
+ <str name="name">jarowinkler</str>
576
+ <str name="field">spell</str>
577
+ <!-- Use a different Distance Measure -->
578
+ <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
579
+ <str name="spellcheckIndexDir">./spellchecker2</str>
580
+
581
+ </lst>
582
+
583
+ <lst name="spellchecker">
584
+ <str name="classname">solr.FileBasedSpellChecker</str>
585
+ <str name="name">file</str>
586
+ <str name="sourceLocation">spellings.txt</str>
587
+ <str name="characterEncoding">UTF-8</str>
588
+ <str name="spellcheckIndexDir">./spellcheckerFile</str>
589
+ </lst>
590
+ </searchComponent>
591
+
592
+ <!-- A request handler utilizing the spellcheck component.
593
+ ################################################################################################
594
+ NOTE: This is purely as an example. The whole purpose of the SpellCheckComponent is to hook it into
595
+ the request handler that handles (i.e. the standard or dismax SearchHandler)
596
+ queries such that a separate request is not needed to get suggestions.
597
+
598
+ IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
599
+ ################################################################################################
600
+ -->
601
+ <requestHandler name="/spellCheckCompRH" class="solr.SearchHandler">
602
+ <lst name="defaults">
603
+ <!-- omp = Only More Popular -->
604
+ <str name="spellcheck.onlyMorePopular">false</str>
605
+ <!-- exr = Extended Results -->
606
+ <str name="spellcheck.extendedResults">false</str>
607
+ <!-- The number of suggestions to return -->
608
+ <str name="spellcheck.count">1</str>
609
+ </lst>
610
+ <arr name="last-components">
611
+ <str>spellcheck</str>
612
+ </arr>
613
+ </requestHandler>
614
+
615
+ <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
616
+ <lst name="defaults">
617
+ <str name="config">data-config.xml</str>
618
+ </lst>
619
+ </requestHandler>
620
+
621
+ <searchComponent name="tvComponent" class="org.apache.solr.handler.component.TermVectorComponent"/>
622
+ <!-- A Req Handler for working with the tvComponent. This is purely as an example.
623
+ You will likely want to add the component to your already specified request handlers. -->
624
+ <requestHandler name="tvrh" class="org.apache.solr.handler.component.SearchHandler">
625
+ <lst name="defaults">
626
+ <bool name="tv">true</bool>
627
+ </lst>
628
+ <arr name="last-components">
629
+ <str>tvComponent</str>
630
+ </arr>
631
+ </requestHandler>
632
+
633
+ <!--
634
+ <requestHandler name="/update/extract" class="org.apache.solr.handler.extraction.ExtractingRequestHandler">
635
+ <lst name="defaults">
636
+ <str name="ext.map.Last-Modified">last_modified</str>
637
+ <bool name="ext.ignore.und.fl">true</bool>
638
+ </lst>
639
+ </requestHandler>
640
+ -->
641
+
642
+
643
+
644
+ <searchComponent name="termsComp" class="org.apache.solr.handler.component.TermsComponent"/>
645
+
646
+ <requestHandler name="/autoSuggest" class="org.apache.solr.handler.component.SearchHandler">
647
+ <arr name="components">
648
+ <str>termsComp</str>
649
+ </arr>
650
+ </requestHandler>
651
+
652
+
653
+ <!-- Update request handler.
654
+
655
+ Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
656
+ the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
657
+ The response format differs from solr1.1 formatting and returns a standard error code.
658
+
659
+ To enable solr1.1 behavior, remove the /update handler or change its path
660
+ -->
661
+ <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
662
+
663
+
664
+ <requestHandler name="/update/javabin" class="solr.BinaryUpdateRequestHandler" />
665
+
666
+ <!--
667
+ Analysis request handler. Since Solr 1.3. Use to returnhow a document is analyzed. Useful
668
+ for debugging and as a token server for other types of applications
669
+ -->
670
+ <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
671
+
672
+
673
+ <!-- CSV update handler, loaded on demand -->
674
+ <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
675
+
676
+
677
+ <!--
678
+ Admin Handlers - This will register all the standard admin RequestHandlers. Adding
679
+ this single handler is equivalent to registering:
680
+
681
+ <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
682
+ <requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
683
+ <requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
684
+ <requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
685
+ <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
686
+ <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
687
+
688
+ If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using:
689
+ <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
690
+ <lst name="invariants">
691
+ <str name="hidden">synonyms.txt</str>
692
+ <str name="hidden">anotherfile.txt</str>
693
+ </lst>
694
+ </requestHandler>
695
+ -->
696
+ <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
697
+
698
+ <!-- ping/healthcheck -->
699
+ <requestHandler name="/admin/ping" class="PingRequestHandler">
700
+ <lst name="defaults">
701
+ <str name="qt">standard</str>
702
+ <str name="q">solrpingquery</str>
703
+ <str name="echoParams">all</str>
704
+ </lst>
705
+ </requestHandler>
706
+
707
+ <!-- Echo the request contents back to the client -->
708
+ <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
709
+ <lst name="defaults">
710
+ <str name="echoParams">explicit</str> <!-- for all params (including the default etc) use: 'all' -->
711
+ <str name="echoHandler">true</str>
712
+ </lst>
713
+ </requestHandler>
714
+
715
+ <highlighting>
716
+ <!-- Configure the standard fragmenter -->
717
+ <!-- This could most likely be commented out in the "default" case -->
718
+ <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
719
+ <lst name="defaults">
720
+ <int name="hl.fragsize">100</int>
721
+ </lst>
722
+ </fragmenter>
723
+
724
+ <!-- A regular-expression-based fragmenter (f.i., for sentence extraction) -->
725
+ <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
726
+ <lst name="defaults">
727
+ <!-- slightly smaller fragsizes work better because of slop -->
728
+ <int name="hl.fragsize">70</int>
729
+ <!-- allow 50% slop on fragment sizes -->
730
+ <float name="hl.regex.slop">0.5</float>
731
+ <!-- a basic sentence pattern -->
732
+ <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
733
+ </lst>
734
+ </fragmenter>
735
+
736
+ <!-- Configure the standard formatter -->
737
+ <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
738
+ <lst name="defaults">
739
+ <str name="hl.simple.pre"><![CDATA[<em>]]></str>
740
+ <str name="hl.simple.post"><![CDATA[</em>]]></str>
741
+ </lst>
742
+ </formatter>
743
+ </highlighting>
744
+
745
+ <!-- An example dedup update processor that creates the "id" field on the fly
746
+ based on the hash code of some other fields. This example has overwriteDupes
747
+ set to false since we are using the id field as the signatureField and Solr
748
+ will maintain uniqueness based on that anyway. -->
749
+ <!--
750
+ <updateRequestProcessorChain name="dedupe">
751
+ <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
752
+ <bool name="enabled">true</bool>
753
+ <str name="signatureField">id</str>
754
+ <bool name="overwriteDupes">false</bool>
755
+ <str name="fields">name,features,cat</str>
756
+ <str name="signatureClass">org.apache.solr.update.processor.Lookup3Signature</str>
757
+ </processor>
758
+ <processor class="solr.LogUpdateProcessorFactory" />
759
+ <processor class="solr.RunUpdateProcessorFactory" />
760
+ </updateRequestProcessorChain>
761
+ -->
762
+
763
+
764
+ <!-- queryResponseWriter plugins... query responses will be written using the
765
+ writer specified by the 'wt' request parameter matching the name of a registered
766
+ writer.
767
+ The "default" writer is the default and will be used if 'wt' is not specified
768
+ in the request. XMLResponseWriter will be used if nothing is specified here.
769
+ The json, python, and ruby writers are also available by default.
770
+
771
+ <queryResponseWriter name="xml" class="org.apache.solr.request.XMLResponseWriter" default="true"/>
772
+ <queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
773
+ <queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>
774
+ <queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
775
+ <queryResponseWriter name="php" class="org.apache.solr.request.PHPResponseWriter"/>
776
+ <queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>
777
+
778
+ <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
779
+ -->
780
+
781
+ <!-- XSLT response writer transforms the XML output by any xslt file found
782
+ in Solr's conf/xslt directory. Changes to xslt files are checked for
783
+ every xsltCacheLifetimeSeconds.
784
+ -->
785
+ <queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
786
+ <int name="xsltCacheLifetimeSeconds">5</int>
787
+ </queryResponseWriter>
788
+
789
+
790
+ <!-- example of registering a query parser
791
+ <queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
792
+ -->
793
+
794
+ <!-- example of registering a custom function parser
795
+ <valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />
796
+ -->
797
+
798
+ <!-- config for the admin interface -->
799
+ <admin>
800
+ <defaultQuery>solr</defaultQuery>
801
+
802
+ <!-- configure a healthcheck file for servers behind a loadbalancer
803
+ <healthcheck type="file">server-enabled</healthcheck>
804
+ -->
805
+ </admin>
806
+
807
+ </config>