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