/[LeafOK_CVS]/lbbs-combo/solr-config/conf/solrconfig.xml
ViewVC logotype

Annotation of /lbbs-combo/solr-config/conf/solrconfig.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Jan 22 14:35:27 2026 UTC (7 weeks, 5 days ago) by sysadm
Branch: MAIN
CVS Tags: HEAD
Content type: application/xml
Add Solr configset for lbbs

1 sysadm 1.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 https://solr.apache.org/guide/solr/latest/configuration-guide/configuring-solrconfig-xml.html.
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>9.12</luceneMatchVersion>
39    
40     <!-- Data Directory
41    
42     Used to specify an alternate directory to hold all index data
43     other than the default ./data under the Solr home. If
44     replication is in use, this should match the replication
45     configuration.
46     -->
47     <dataDir>${solr.data.dir:}</dataDir>
48    
49    
50     <!-- The DirectoryFactory to use for indexes.
51    
52     solr.StandardDirectoryFactory is filesystem
53     based and tries to pick the best implementation for the current
54     JVM and platform. solr.NRTCachingDirectoryFactory, the default,
55     wraps solr.StandardDirectoryFactory and caches small files in memory
56     for better NRT performance.
57    
58     One can force a particular implementation via solr.MMapDirectoryFactory
59     or solr.NIOFSDirectoryFactory.
60    
61     solr.RAMDirectoryFactory is memory based and not persistent.
62     -->
63     <directoryFactory name="DirectoryFactory"
64     class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
65    
66     <!-- The CodecFactory for defining the format of the inverted index.
67     The default implementation is SchemaCodecFactory, which is the official Lucene
68     index format, but hooks into the schema to provide per-field customization of
69     the postings lists and per-document values in the fieldType element
70     (postingsFormat/docValuesFormat). Note that most of the alternative implementations
71     are experimental, so if you choose to customize the index format, it's a good
72     idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
73     before upgrading to a newer version to avoid unnecessary reindexing.
74     A "compressionMode" string element can be added to <codecFactory> to choose
75     between the existing compression modes in the default codec: "BEST_SPEED" (default)
76     or "BEST_COMPRESSION".
77     -->
78     <codecFactory class="solr.SchemaCodecFactory"/>
79    
80     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81     Index Config - These settings control low-level behavior of indexing
82     Most example settings here show the default value, but are commented
83     out, to more easily see where customizations have been made.
84    
85     Note: This replaces <indexDefaults> and <mainIndex> from older versions
86     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
87     <indexConfig>
88     <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
89     LimitTokenCountFilterFactory in your fieldType definition. E.g.
90     <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
91     -->
92     <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
93     <!-- <writeLockTimeout>1000</writeLockTimeout> -->
94    
95     <!-- Expert: Enabling compound file will use less files for the index,
96     using fewer file descriptors on the expense of performance decrease.
97     Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
98     <!-- <useCompoundFile>false</useCompoundFile> -->
99    
100     <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
101     indexing for buffering added documents and deletions before they are
102     flushed to the Directory.
103     maxBufferedDocs sets a limit on the number of documents buffered
104     before flushing.
105     If both ramBufferSizeMB and maxBufferedDocs is set, then
106     Lucene will flush based on whichever limit is hit first. -->
107     <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
108     <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
109    
110     <!-- Expert: ramPerThreadHardLimitMB sets the maximum amount of RAM that can be consumed
111     per thread before they are flushed. When limit is exceeded, this triggers a forced
112     flush even if ramBufferSizeMB has not been exceeded.
113     This is a safety limit to prevent Lucene's DocumentsWriterPerThread from address space
114     exhaustion due to its internal 32 bit signed integer based memory addressing.
115     The specified value should be greater than 0 and less than 2048MB. When not specified,
116     Solr uses Lucene's default value 1945. -->
117     <!-- <ramPerThreadHardLimitMB>1945</ramPerThreadHardLimitMB> -->
118    
119     <!-- Expert: Merge Policy
120     The Merge Policy in Lucene controls how merging of segments is done.
121     The default since Solr/Lucene 3.3 is TieredMergePolicy.
122     The default since Lucene 2.3 was the LogByteSizeMergePolicy,
123     Even older versions of Lucene used LogDocMergePolicy.
124     -->
125     <!--
126     <mergePolicyFactory class="org.apache.solr.index.TieredMergePolicyFactory">
127     <int name="maxMergeAtOnce">10</int>
128     <int name="segmentsPerTier">10</int>
129     <double name="noCFSRatio">0.1</double>
130     </mergePolicyFactory>
131     -->
132    
133     <!-- Expert: Merge Scheduler
134     The Merge Scheduler in Lucene controls how merges are
135     performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
136     can perform merges in the background using separate threads.
137     The SerialMergeScheduler (Lucene 2.2 default) does not.
138     -->
139     <!--
140     <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
141     -->
142    
143     <!-- LockFactory
144    
145     This option specifies which Lucene LockFactory implementation
146     to use.
147    
148     single = SingleInstanceLockFactory - suggested for a
149     read-only index or when there is no possibility of
150     another process trying to modify the index.
151     native = NativeFSLockFactory - uses OS native file locking.
152     Do not use when multiple solr webapps in the same
153     JVM are attempting to share a single index.
154     simple = SimpleFSLockFactory - uses a plain file for locking
155    
156     Defaults: 'native' is default for Solr3.6 and later, otherwise
157     'simple' is the default
158    
159     More details on the nuances of each LockFactory...
160     https://cwiki.apache.org/confluence/display/lucene/AvailableLockFactories
161     -->
162     <lockType>${solr.lock.type:native}</lockType>
163    
164     <!-- Commit Deletion Policy
165     Custom deletion policies can be specified here. The class must
166     implement org.apache.lucene.index.IndexDeletionPolicy.
167    
168     The default Solr IndexDeletionPolicy implementation supports
169     deleting index commit points on number of commits, age of
170     commit point and optimized status.
171    
172     The latest commit point should always be preserved regardless
173     of the criteria.
174     -->
175     <!--
176     <deletionPolicy class="solr.SolrDeletionPolicy">
177     -->
178     <!-- The number of commit points to be kept -->
179     <!-- <str name="maxCommitsToKeep">1</str> -->
180     <!-- The number of optimized commit points to be kept -->
181     <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
182     <!--
183     Delete all commit points once they have reached the given age.
184     Supports DateMathParser syntax e.g.
185     -->
186     <!--
187     <str name="maxCommitAge">30MINUTES</str>
188     <str name="maxCommitAge">1DAY</str>
189     -->
190     <!--
191     </deletionPolicy>
192     -->
193    
194     <!-- Lucene Infostream
195    
196     To aid in advanced debugging, Lucene provides an "InfoStream"
197     of detailed information when indexing.
198    
199     Setting The value to true will instruct the underlying Lucene
200     IndexWriter to write its debugging info the specified file
201     -->
202     <!-- <infoStream file="INFOSTREAM.txt">false</infoStream> -->
203     </indexConfig>
204    
205     <!-- The default high-performance update handler -->
206     <updateHandler class="solr.DirectUpdateHandler2">
207    
208     <!-- Enables a transaction log, used for real-time get, durability, and
209     and solr cloud replica recovery. The log can grow as big as
210     uncommitted changes to the index, so use of a hard autoCommit
211     is recommended (see below).
212     "dir" - the target directory for transaction logs, defaults to the
213     solr data directory.
214     -->
215     <updateLog>
216     <str name="dir">${solr.ulog.dir:}</str>
217     </updateLog>
218    
219     <!-- AutoCommit
220    
221     Perform a hard commit automatically under certain conditions.
222     Instead of enabling autoCommit, consider using "commitWithin"
223     when adding documents.
224    
225     https://solr.apache.org/guide/solr/latest/indexing-guide/indexing-with-update-handlers.html
226    
227     maxDocs - Maximum number of documents to add since the last
228     commit before automatically triggering a new commit.
229    
230     maxTime - Maximum amount of time in ms that is allowed to pass
231     since a document was added before automatically
232     triggering a new commit.
233     openSearcher - if false, the commit causes recent index changes
234     to be flushed to stable storage, but does not cause a new
235     searcher to be opened to make those changes visible.
236    
237     If the updateLog is enabled, then it's highly recommended to
238     have some sort of hard autoCommit to limit the log size.
239     -->
240     <autoCommit>
241     <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
242     <openSearcher>false</openSearcher>
243     </autoCommit>
244    
245     <!-- softAutoCommit is like autoCommit except it causes a
246     'soft' commit which only ensures that changes are visible
247     but does not ensure that data is synced to disk. This is
248     faster and more near-realtime friendly than a hard commit.
249     -->
250    
251     <autoSoftCommit>
252     <maxTime>${solr.autoSoftCommit.maxTime:3000}</maxTime>
253     </autoSoftCommit>
254    
255     <!-- Update Related Event Listeners
256    
257     Various IndexWriter related events can trigger Listeners to
258     take actions.
259    
260     postCommit - fired after every commit or optimize command
261     postOptimize - fired after every optimize command
262     -->
263    
264     </updateHandler>
265    
266     <!-- IndexReaderFactory
267    
268     Use the following format to specify a custom IndexReaderFactory,
269     which allows for alternate IndexReader implementations.
270    
271     ** Experimental Feature **
272    
273     Please note - Using a custom IndexReaderFactory may prevent
274     certain other features from working. The API to
275     IndexReaderFactory may change without warning or may even be
276     removed from future releases if the problems cannot be
277     resolved.
278    
279    
280     ** Features that may not work with custom IndexReaderFactory **
281    
282     The ReplicationHandler assumes a disk-resident index. Using a
283     custom IndexReader implementation may cause incompatibility
284     with ReplicationHandler and may cause replication to not work
285     correctly. See SOLR-1366 for details.
286    
287     -->
288     <!--
289     <indexReaderFactory name="IndexReaderFactory" class="package.class">
290     <str name="someArg">Some Value</str>
291     </indexReaderFactory >
292     -->
293    
294     <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
295     Query section - these settings control query time things like caches
296     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
297     <query>
298    
299     <!-- Maximum number of clauses allowed when parsing a boolean query string.
300    
301     This limit only impacts boolean queries specified by a user as part of a query string,
302     and provides per-collection controls on how complex user specified boolean queries can
303     be. Query strings that specify more clauses than this will result in an error.
304    
305     If this per-collection limit is greater than the global `maxBooleanClauses` limit
306     specified in `solr.xml`, it will have no effect, as that setting also limits the size
307     of user specified boolean queries.
308     -->
309     <maxBooleanClauses>${solr.max.booleanClauses:1024}</maxBooleanClauses>
310    
311     <!-- Minimum acceptable prefix-size for prefix-based queries.
312    
313     Prefix-based queries consume memory in proportion to the number of terms in the index
314     that start with that prefix. Short prefixes tend to match many many more indexed-terms
315     and consume more memory as a result, sometimes causing stability issues on the node.
316    
317     This setting allows administrators to require that prefixes meet or exceed a specified
318     minimum length requirement. Prefix queries that don't meet this requirement return an
319     error to users. The limit may be overridden on a per-query basis by specifying a
320     'minPrefixQueryTermLength' local-param value.
321    
322     The flag value of '-1' can be used to disable enforcement of this limit.
323     -->
324     <minPrefixQueryTermLength>${solr.query.minPrefixLength:-1}</minPrefixQueryTermLength>
325    
326     <!-- Solr Internal Query Caches
327     Starting with Solr 9.0 the default cache implementation used is CaffeineCache.
328     -->
329    
330     <!-- Filter Cache
331    
332     Cache used by SolrIndexSearcher for filters (DocSets),
333     unordered sets of *all* documents that match a query. When a
334     new searcher is opened, its caches may be prepopulated or
335     "autowarmed" using data from caches in the old searcher.
336     autowarmCount is the number of items to prepopulate. For
337     CaffeineCache, the autowarmed items will be the most recently
338     accessed items.
339    
340     Parameters:
341     class - the SolrCache implementation (CaffeineCache by default)
342     size - the maximum number of entries in the cache
343     initialSize - the initial capacity (number of entries) of
344     the cache. (see java.util.HashMap)
345     autowarmCount - the number of entries to prepopulate from
346     an old cache.
347     maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
348     to occupy. Note that when this option is specified, the size
349     and initialSize parameters are ignored.
350     -->
351     <filterCache size="512"
352     initialSize="512"
353     autowarmCount="0"/>
354    
355     <!-- Query Result Cache
356    
357     Caches results of searches - ordered lists of document ids
358     (DocList) based on a query, a sort, and the range of documents requested.
359     Additional supported parameter by CaffeineCache:
360     maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
361     to occupy
362     -->
363     <queryResultCache size="512"
364     initialSize="512"
365     autowarmCount="0"/>
366    
367     <!-- Document Cache
368    
369     Caches Lucene Document objects (the stored fields for each
370     document). Since Lucene internal document ids are transient,
371     this cache will not be autowarmed.
372     -->
373     <documentCache size="512"
374     initialSize="512"
375     autowarmCount="0"/>
376    
377     <!-- custom cache currently used by block join -->
378     <cache name="perSegFilter"
379     class="solr.CaffeineCache"
380     size="10"
381     initialSize="0"
382     autowarmCount="10"
383     regenerator="solr.NoOpRegenerator" />
384    
385     <!-- Field Value Cache
386    
387     Cache used to hold field values that are quickly accessible
388     by document id. The fieldValueCache is created by default
389     even if not configured here.
390     -->
391     <!--
392     <fieldValueCache size="512"
393     autowarmCount="128"
394     />
395     -->
396    
397     <!-- Custom Cache
398    
399     Example of a generic cache. These caches may be accessed by
400     name through SolrIndexSearcher.getCache(),cacheLookup(), and
401     cacheInsert(). The purpose is to enable easy caching of
402     user/application level data. The regenerator argument should
403     be specified as an implementation of solr.CacheRegenerator
404     if autowarming is desired.
405     -->
406     <!--
407     <cache name="myUserCache"
408     class="solr.CaffeineCache"
409     size="4096"
410     initialSize="1024"
411     autowarmCount="1024"
412     regenerator="com.mycompany.MyRegenerator"
413     />
414     -->
415    
416    
417     <!-- Lazy Field Loading
418    
419     If true, stored fields that are not requested will be loaded
420     lazily. This can result in a significant speed improvement
421     if the usual case is to not load all stored fields,
422     especially if the skipped fields are large compressed text
423     fields.
424     -->
425     <enableLazyFieldLoading>true</enableLazyFieldLoading>
426    
427     <!-- Use Filter For Sorted Query
428    
429     A possible optimization that attempts to use a filter to
430     satisfy a search. If the requested sort does not include
431     score, then the filterCache will be checked for a filter
432     matching the query. If found, the filter will be used as the
433     source of document ids, and then the sort will be applied to
434     that.
435    
436     For most situations, this will not be useful unless you
437     frequently get the same search repeatedly with different sort
438     options, and none of them ever use "score"
439     -->
440     <!--
441     <useFilterForSortedQuery>true</useFilterForSortedQuery>
442     -->
443    
444     <!-- Result Window Size
445    
446     An optimization for use with the queryResultCache. When a search
447     is requested, a superset of the requested number of document ids
448     are collected. For example, if a search for a particular query
449     requests matching documents 10 through 19, and queryWindowSize is 50,
450     then documents 0 through 49 will be collected and cached. Any further
451     requests in that range can be satisfied via the cache.
452     -->
453     <queryResultWindowSize>20</queryResultWindowSize>
454    
455     <!-- Maximum number of documents to cache for any entry in the
456     queryResultCache.
457     -->
458     <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
459    
460     <!-- Query Related Event Listeners
461    
462     Various IndexSearcher related events can trigger Listeners to
463     take actions.
464    
465     newSearcher - fired whenever a new searcher is being prepared
466     and there is a current searcher handling requests (aka
467     registered). It can be used to prime certain caches to
468     prevent long request times for certain requests.
469    
470     firstSearcher - fired whenever a new searcher is being
471     prepared but there is no current registered searcher to handle
472     requests or to gain autowarming data from.
473    
474    
475     -->
476     <!-- QuerySenderListener takes an array of NamedList and executes a
477     local query request for each NamedList in sequence.
478     -->
479     <listener event="newSearcher" class="solr.QuerySenderListener">
480     <arr name="queries">
481     <!--
482     <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
483     <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
484     -->
485     </arr>
486     </listener>
487     <listener event="firstSearcher" class="solr.QuerySenderListener">
488     <arr name="queries">
489     <!--
490     <lst>
491     <str name="q">static firstSearcher warming in solrconfig.xml</str>
492     </lst>
493     -->
494     </arr>
495     </listener>
496    
497     <!-- Use Cold Searcher
498    
499     If a search request comes in and there is no current
500     registered searcher, then immediately register the still
501     warming searcher and use it. If "false" then all requests
502     will block until the first searcher is done warming.
503     -->
504     <useColdSearcher>false</useColdSearcher>
505    
506     </query>
507    
508     <!-- Request Dispatcher
509    
510     This section contains instructions for how the SolrDispatchFilter
511     should behave when processing requests for this SolrCore.
512    
513     -->
514     <requestDispatcher>
515     <!-- Request Parsing
516    
517     These settings indicate how Solr Requests may be parsed, and
518     what restrictions may be placed on the ContentStreams from
519     those requests
520    
521     multipartUploadLimitInKB - specifies the max size (in KiB) of
522     Multipart File Uploads that Solr will allow in a Request.
523    
524     formdataUploadLimitInKB - specifies the max size (in KiB) of
525     form data (application/x-www-form-urlencoded) sent via
526     POST. You can use POST to pass request parameters not
527     fitting into the URL.
528    
529     addHttpRequestToContext - if set to true, it will instruct
530     the requestParsers to include the original HttpServletRequest
531     object in the context map of the SolrQueryRequest under the
532     key "httpRequest". It will not be used by any of the existing
533     Solr components, but may be useful when developing custom
534     plugins.
535    
536     <requestParsers multipartUploadLimitInKB="-1"
537     formdataUploadLimitInKB="-1"
538     addHttpRequestToContext="false"/>
539     -->
540    
541     <!-- HTTP Caching
542    
543     Set HTTP caching related parameters (for proxy caches and clients).
544    
545     The options below instruct Solr not to output any HTTP Caching
546     related headers
547     -->
548     <httpCaching never304="true" />
549     <!-- If you include a <cacheControl> directive, it will be used to
550     generate a Cache-Control header (as well as an Expires header
551     if the value contains "max-age=")
552    
553     By default, no Cache-Control header is generated.
554    
555     You can use the <cacheControl> option even if you have set
556     never304="true"
557     -->
558     <!--
559     <httpCaching never304="true" >
560     <cacheControl>max-age=30, public</cacheControl>
561     </httpCaching>
562     -->
563     <!-- To enable Solr to respond with automatically generated HTTP
564     Caching headers, and to response to Cache Validation requests
565     correctly, set the value of never304="false"
566    
567     This will cause Solr to generate Last-Modified and ETag
568     headers based on the properties of the Index.
569    
570     The following options can also be specified to affect the
571     values of these headers...
572    
573     lastModFrom - the default value is "openTime" which means the
574     Last-Modified value (and validation against If-Modified-Since
575     requests) will all be relative to when the current Searcher
576     was opened. You can change it to lastModFrom="dirLastMod" if
577     you want the value to exactly correspond to when the physical
578     index was last modified.
579    
580     etagSeed="..." is an option you can change to force the ETag
581     header (and validation against If-None-Match requests) to be
582     different even if the index has not changed (ie: when making
583     significant changes to your config file)
584    
585     (lastModifiedFrom and etagSeed are both ignored if you use
586     the never304="true" option)
587     -->
588     <!--
589     <httpCaching lastModifiedFrom="openTime"
590     etagSeed="Solr">
591     <cacheControl>max-age=30, public</cacheControl>
592     </httpCaching>
593     -->
594     </requestDispatcher>
595    
596     <!-- Request Handlers
597    
598     https://solr.apache.org/guide/solr/latest/configuration-guide/requesthandlers-searchcomponents.html
599    
600     Incoming queries will be dispatched to a specific handler by name based on the path specified in the request.
601    
602     All handlers (Search Handlers, Update Request Handlers, and other specialized types) can have default parameters (defaults, appends and invariants).
603    
604     Search Handlers can also (append, prepend or even replace) default or defined Search Components.
605    
606     Update Request Handlers can leverage Update Request Processors to pre-process documents after they are loaded
607     and before they are indexed/stored.
608    
609     Not all Request Handlers are defined in the solrconfig.xml, many are implicit.
610     -->
611    
612     <!-- Primary search handler, expected by most clients, examples and UI frameworks -->
613     <requestHandler name="/select" class="solr.SearchHandler">
614     <lst name="defaults">
615     <str name="echoParams">explicit</str>
616     <int name="rows">10</int>
617     </lst>
618     </requestHandler>
619    
620     <!-- A request handler that returns indented JSON by default -->
621     <requestHandler name="/query" class="solr.SearchHandler">
622     <lst name="defaults">
623     <str name="echoParams">explicit</str>
624     <str name="wt">json</str>
625     <str name="indent">true</str>
626     </lst>
627     </requestHandler>
628    
629     <!-- Shared parameters for multiple Request Handlers -->
630     <initParams path="/update/**,/query,/select,/spell">
631     <lst name="defaults">
632     <str name="df">_text_</str>
633     </lst>
634     </initParams>
635    
636     <!-- Spell Check
637    
638     The spell check component can return a list of alternative spelling
639     suggestions.
640    
641     https://solr.apache.org/guide/solr/latest/query-guide/spell-checking.html
642     -->
643     <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
644    
645     <str name="queryAnalyzerFieldType">text_general</str>
646    
647     <!-- Multiple "Spell Checkers" can be declared and used by this
648     component
649     -->
650    
651     <!-- a spellchecker built from a field of the main index -->
652     <lst name="spellchecker">
653     <str name="name">default</str>
654     <str name="field">_text_</str>
655     <str name="classname">solr.DirectSolrSpellChecker</str>
656     <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
657     <str name="distanceMeasure">internal</str>
658     <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
659     <float name="accuracy">0.5</float>
660     <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
661     <int name="maxEdits">2</int>
662     <!-- the minimum shared prefix when enumerating terms -->
663     <int name="minPrefix">1</int>
664     <!-- maximum number of inspections per result. -->
665     <int name="maxInspections">5</int>
666     <!-- minimum length of a query term to be considered for correction -->
667     <int name="minQueryLength">4</int>
668     <!-- maximum threshold of documents a query term can appear to be considered for correction -->
669     <float name="maxQueryFrequency">0.01</float>
670     <!-- uncomment this to require suggestions to occur in 1% of the documents
671     <float name="thresholdTokenFrequency">.01</float>
672     -->
673     </lst>
674    
675     <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
676     <!--
677     <lst name="spellchecker">
678     <str name="name">wordbreak</str>
679     <str name="classname">solr.WordBreakSolrSpellChecker</str>
680     <str name="field">name</str>
681     <str name="combineWords">true</str>
682     <str name="breakWords">true</str>
683     <int name="maxChanges">10</int>
684     </lst>
685     -->
686     </searchComponent>
687    
688     <!-- A request handler for demonstrating the spellcheck component.
689    
690     NOTE: This is purely as an example. The whole purpose of the
691     SpellCheckComponent is to hook it into the request handler that
692     handles your normal user queries so that a separate request is
693     not needed to get suggestions.
694    
695     IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
696     NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
697    
698     See https://solr.apache.org/guide/solr/latest/query-guide/spell-checking.html for details
699     on the request parameters.
700     -->
701     <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
702     <lst name="defaults">
703     <!-- Solr will use suggestions from both the 'default' spellchecker
704     and from the 'wordbreak' spellchecker and combine them.
705     collations (re-written queries) can include a combination of
706     corrections from both spellcheckers -->
707     <str name="spellcheck.dictionary">default</str>
708     <str name="spellcheck">on</str>
709     <str name="spellcheck.extendedResults">true</str>
710     <str name="spellcheck.count">10</str>
711     <str name="spellcheck.alternativeTermCount">5</str>
712     <str name="spellcheck.maxResultsForSuggest">5</str>
713     <str name="spellcheck.collate">true</str>
714     <str name="spellcheck.collateExtendedResults">true</str>
715     <str name="spellcheck.maxCollationTries">10</str>
716     <str name="spellcheck.maxCollations">5</str>
717     </lst>
718     <arr name="last-components">
719     <str>spellcheck</str>
720     </arr>
721     </requestHandler>
722    
723     <!-- Highlighting Component
724    
725     https://solr.apache.org/guide/solr/latest/query-guide/highlighting.html
726     -->
727     <searchComponent class="solr.HighlightComponent" name="highlight">
728     <!-- note: the hl.method=unified highlighter is not configured here; it's completely configured
729     via parameters. The below configuration supports hl.method=original and fastVector. -->
730     <highlighting>
731     <!-- Configure the standard fragmenter -->
732     <!-- This could most likely be commented out in the "default" case -->
733     <fragmenter name="gap"
734     default="true"
735     class="solr.highlight.GapFragmenter">
736     <lst name="defaults">
737     <int name="hl.fragsize">100</int>
738     </lst>
739     </fragmenter>
740    
741     <!-- A regular-expression-based fragmenter
742     (for sentence extraction)
743     -->
744     <fragmenter name="regex"
745     class="solr.highlight.RegexFragmenter">
746     <lst name="defaults">
747     <!-- slightly smaller fragsizes work better because of slop -->
748     <int name="hl.fragsize">70</int>
749     <!-- allow 50% slop on fragment sizes -->
750     <float name="hl.regex.slop">0.5</float>
751     <!-- a basic sentence pattern -->
752     <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
753     </lst>
754     </fragmenter>
755    
756     <!-- Configure the standard formatter -->
757     <formatter name="html"
758     default="true"
759     class="solr.highlight.HtmlFormatter">
760     <lst name="defaults">
761     <str name="hl.simple.pre"><![CDATA[<em>]]></str>
762     <str name="hl.simple.post"><![CDATA[</em>]]></str>
763     </lst>
764     </formatter>
765    
766     <!-- Configure the standard encoder -->
767     <encoder name="html"
768     class="solr.highlight.HtmlEncoder" />
769    
770     <!-- Configure the standard fragListBuilder -->
771     <fragListBuilder name="simple"
772     class="solr.highlight.SimpleFragListBuilder"/>
773    
774     <!-- Configure the single fragListBuilder -->
775     <fragListBuilder name="single"
776     class="solr.highlight.SingleFragListBuilder"/>
777    
778     <!-- Configure the weighted fragListBuilder -->
779     <fragListBuilder name="weighted"
780     default="true"
781     class="solr.highlight.WeightedFragListBuilder"/>
782    
783     <!-- default tag FragmentsBuilder -->
784     <fragmentsBuilder name="default"
785     default="true"
786     class="solr.highlight.ScoreOrderFragmentsBuilder">
787     <!--
788     <lst name="defaults">
789     <str name="hl.multiValuedSeparatorChar">/</str>
790     </lst>
791     -->
792     </fragmentsBuilder>
793    
794     <!-- multi-colored tag FragmentsBuilder -->
795     <fragmentsBuilder name="colored"
796     class="solr.highlight.ScoreOrderFragmentsBuilder">
797     <lst name="defaults">
798     <str name="hl.tag.pre"><![CDATA[
799     <b style="background:yellow">,<b style="background:lawgreen">,
800     <b style="background:aquamarine">,<b style="background:magenta">,
801     <b style="background:palegreen">,<b style="background:coral">,
802     <b style="background:wheat">,<b style="background:khaki">,
803     <b style="background:lime">,<b style="background:deepskyblue">]]></str>
804     <str name="hl.tag.post"><![CDATA[</b>]]></str>
805     </lst>
806     </fragmentsBuilder>
807    
808     <boundaryScanner name="default"
809     default="true"
810     class="solr.highlight.SimpleBoundaryScanner">
811     <lst name="defaults">
812     <str name="hl.bs.maxScan">10</str>
813     <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
814     </lst>
815     </boundaryScanner>
816    
817     <boundaryScanner name="breakIterator"
818     class="solr.highlight.BreakIteratorBoundaryScanner">
819     <lst name="defaults">
820     <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
821     <str name="hl.bs.type">WORD</str>
822     <!-- language and country are used when constructing Locale object. -->
823     <!-- And the Locale object will be used when getting instance of BreakIterator -->
824     <str name="hl.bs.language">en</str>
825     <str name="hl.bs.country">US</str>
826     </lst>
827     </boundaryScanner>
828     </highlighting>
829     </searchComponent>
830    
831     <!-- Update Request Processors
832     https://solr.apache.org/guide/solr/latest/configuration-guide/update-request-processors.html
833    
834     Chains or individual Update Request Processor Factories can be declared and referenced
835     to preprocess documents sent to Update Request Handlers.
836     -->
837    
838     <!-- Add unknown fields to the schema
839    
840     Field type guessing update request processors that will
841     attempt to parse string-typed field values as Booleans, Longs,
842     Doubles, or Dates, and then add schema fields with the guessed
843     field types Text content will be indexed as "text_general" as
844     well as a copy to a plain string version in *_str.
845     See the updateRequestProcessorChain defined later for the order they are executed in.
846    
847     These require that the schema is both managed and mutable, by
848     declaring schemaFactory as ManagedIndexSchemaFactory, with
849     mutable specified as true.
850    
851     See https://solr.apache.org/guide/solr/latest/indexing-guide/schemaless-mode.html for further explanation.
852    
853     -->
854     <updateProcessor class="solr.UUIDUpdateProcessorFactory" name="uuid"/>
855     <updateProcessor class="solr.RemoveBlankFieldUpdateProcessorFactory" name="remove-blank"/>
856     <updateProcessor class="solr.FieldNameMutatingUpdateProcessorFactory" name="field-name-mutating">
857     <str name="pattern">[^\w-\.]</str>
858     <str name="replacement">_</str>
859     </updateProcessor>
860     <updateProcessor class="solr.NumFieldLimitingUpdateRequestProcessorFactory" name="max-fields">
861     <int name="maxFields">1000</int>
862     <bool name="warnOnly">true</bool>
863     </updateProcessor>
864     <updateProcessor class="solr.ParseBooleanFieldUpdateProcessorFactory" name="parse-boolean"/>
865     <updateProcessor class="solr.ParseLongFieldUpdateProcessorFactory" name="parse-long"/>
866     <updateProcessor class="solr.ParseDoubleFieldUpdateProcessorFactory" name="parse-double"/>
867     <updateProcessor class="solr.ParseDateFieldUpdateProcessorFactory" name="parse-date">
868     <arr name="format">
869     <str>yyyy-MM-dd['T'[HH:mm[:ss[.SSS]][z</str>
870     <str>yyyy-MM-dd['T'[HH:mm[:ss[,SSS]][z</str>
871     <str>yyyy-MM-dd HH:mm[:ss[.SSS]][z</str>
872     <str>yyyy-MM-dd HH:mm[:ss[,SSS]][z</str>
873     <str>[EEE, ]dd MMM yyyy HH:mm[:ss] z</str>
874     <str>EEEE, dd-MMM-yy HH:mm:ss z</str>
875     <str>EEE MMM ppd HH:mm:ss [z ]yyyy</str>
876     </arr>
877     </updateProcessor>
878     <updateProcessor class="solr.AddSchemaFieldsUpdateProcessorFactory" name="add-schema-fields">
879     <lst name="typeMapping">
880     <str name="valueClass">java.lang.String</str>
881     <str name="fieldType">text_general</str>
882     <lst name="copyField">
883     <str name="dest">*_str</str>
884     <int name="maxChars">256</int>
885     </lst>
886     <!-- Use as default mapping instead of defaultFieldType -->
887     <bool name="default">true</bool>
888     </lst>
889     <lst name="typeMapping">
890     <str name="valueClass">java.lang.Boolean</str>
891     <str name="fieldType">booleans</str>
892     </lst>
893     <lst name="typeMapping">
894     <str name="valueClass">java.util.Date</str>
895     <str name="fieldType">pdates</str>
896     </lst>
897     <lst name="typeMapping">
898     <str name="valueClass">java.lang.Long</str>
899     <str name="valueClass">java.lang.Integer</str>
900     <str name="fieldType">plongs</str>
901     </lst>
902     <lst name="typeMapping">
903     <str name="valueClass">java.lang.Number</str>
904     <str name="fieldType">pdoubles</str>
905     </lst>
906     </updateProcessor>
907    
908    
909     <!-- The update.autoCreateFields property can be turned to false to disable schemaless mode -->
910     <updateRequestProcessorChain name="add-unknown-fields-to-the-schema" default="${update.autoCreateFields:true}"
911     processor="uuid,remove-blank,field-name-mutating,max-fields,parse-boolean,parse-long,parse-double,parse-date,add-schema-fields">
912     <processor class="solr.LogUpdateProcessorFactory"/>
913     <processor class="solr.DistributedUpdateProcessorFactory"/>
914     <processor class="solr.RunUpdateProcessorFactory"/>
915     </updateRequestProcessorChain>
916    
917     <!-- Deduplication
918    
919     An example dedup update request processor chain that creates the "id" field
920     on the fly based on the hash code of some other fields. This
921     example has overwriteDupes set to false since we are using the
922     id field as the signatureField and Solr will maintain
923     uniqueness based on that anyway.
924    
925     -->
926     <!--
927     <updateRequestProcessorChain name="dedupe">
928     <processor class="solr.processor.SignatureUpdateProcessorFactory">
929     <bool name="enabled">true</bool>
930     <str name="signatureField">id</str>
931     <str name="fields">name,features,cat</str>
932     <str name="signatureClass">solr.processor.Lookup3Signature</str>
933     </processor>
934     <processor class="solr.LogUpdateProcessorFactory" />
935     <processor class="solr.RunUpdateProcessorFactory" />
936     </updateRequestProcessorChain>
937     -->
938    
939     <!-- Response Writers
940    
941     https://solr.apache.org/guide/solr/latest/query-guide/response-writers.html
942    
943     Request responses will be written using the writer specified by
944     the 'wt' request parameter matching the name of a registered
945     writer.
946    
947     The "default" writer is the default and will be used if 'wt' is
948     not specified in the request.
949     -->
950     <!-- The following response writers are implicitly configured unless
951     overridden...
952     -->
953     <!--
954     <queryResponseWriter name="xml"
955     default="true"
956     class="solr.XMLResponseWriter" />
957     <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
958     <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
959     <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
960     <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
961     <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
962     <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
963     <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
964     -->
965    
966     <!-- Overriding the content-type of the response writer.
967     For example, Default content-type of JSON is application/json. This can be overridden to
968     text/plain so that response is easy to read in *any* browser.
969     -->
970     <!--
971     <queryResponseWriter name="json" class="solr.JSONResponseWriter">
972     <str name="content-type">text/plain; charset=UTF-8</str>
973     </queryResponseWriter>
974     -->
975    
976     <!-- Query Parsers
977    
978     https://solr.apache.org/guide/solr/latest/query-guide/query-syntax-and-parsers.html
979    
980     Multiple QParserPlugins can be registered by name, and then
981     used in either the "defType" param for the QueryComponent (used
982     by SearchHandler) or in LocalParams
983     -->
984     <!-- example of registering a query parser -->
985     <!--
986     <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
987     -->
988    
989     <!-- Function Parsers
990    
991     https://solr.apache.org/guide/solr/latest/query-guide/function-queries.html
992    
993     Multiple ValueSourceParsers can be registered by name, and then
994     used as function names when using the "func" QParser.
995     -->
996     <!-- example of registering a custom function parser -->
997     <!--
998     <valueSourceParser name="myfunc"
999     class="com.mycompany.MyValueSourceParser" />
1000     -->
1001    
1002    
1003     <!-- Document Transformers
1004     https://solr.apache.org/guide/solr/latest/query-guide/document-transformers.html
1005     -->
1006     <!--
1007     Could be something like:
1008     <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
1009     <int name="connection">jdbc://....</int>
1010     </transformer>
1011    
1012     To add a constant value to all docs, use:
1013     <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1014     <int name="value">5</int>
1015     </transformer>
1016    
1017     If you want the user to still be able to change it with _value:something_ use this:
1018     <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1019     <double name="defaultValue">5</double>
1020     </transformer>
1021    
1022     If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
1023     EditorialMarkerFactory will do exactly that:
1024     <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
1025     -->
1026    
1027     <lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib/" regex="lucene-analysis-smartcn-.*\.jar" />
1028     </config>

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1