· 4 years ago · Apr 11, 2021, 08:10 PM
1<?xml version="1.0" encoding="UTF-8" ?>
2<config>
3 <luceneMatchVersion>8.5.2</luceneMatchVersion>
4 <dataDir>${solr.data.dir:}</dataDir>
5 <directoryFactory name="DirectoryFactory"
6 class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
7 <codecFactory class="solr.SchemaCodecFactory"/>
8
9 <indexConfig>
10 <lockType>${solr.lock.type:native}</lockType>
11 </indexConfig>
12
13 <jmx />
14
15 <updateHandler class="solr.DirectUpdateHandler2">
16
17 <updateLog>
18 <str name="dir">${solr.ulog.dir:}</str>
19 <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
20 </updateLog>
21
22 <autoCommit>
23 <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
24 <openSearcher>false</openSearcher>
25 </autoCommit>
26
27 <autoSoftCommit>
28 <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
29 </autoSoftCommit>
30
31 </updateHandler>
32
33 <!-- IndexReaderFactory
34
35 Use the following format to specify a custom IndexReaderFactory,
36 which allows for alternate IndexReader implementations.
37
38 ** Experimental Feature **
39
40 Please note - Using a custom IndexReaderFactory may prevent
41 certain other features from working. The API to
42 IndexReaderFactory may change without warning or may even be
43 removed from future releases if the problems cannot be
44 resolved.
45
46
47 ** Features that may not work with custom IndexReaderFactory **
48
49 The ReplicationHandler assumes a disk-resident index. Using a
50 custom IndexReader implementation may cause incompatibility
51 with ReplicationHandler and may cause replication to not work
52 correctly. See SOLR-1366 for details.
53
54 -->
55 <!--
56 <indexReaderFactory name="IndexReaderFactory" class="package.class">
57 <str name="someArg">Some Value</str>
58 </indexReaderFactory >
59 -->
60
61 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62 Query section - these settings control query time things like caches
63 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
64 <query>
65
66 <!-- Maximum number of clauses allowed when parsing a boolean query string.
67
68 This limit only impacts boolean queries specified by a user as part of a query string,
69 and provides per-collection controls on how complex user specified boolean queries can
70 be. Query strings that specify more clauses then this will result in an error.
71
72 If this per-collection limit is greater then the global `maxBooleanClauses` limit
73 specified in `solr.xml`, it will have no effect, as that setting also limits the size
74 of user specified boolean queries.
75 -->
76 <maxBooleanClauses>${solr.max.booleanClauses:1024}</maxBooleanClauses>
77
78 <!-- Solr Internal Query Caches
79
80 There are four implementations of cache available for Solr:
81 LRUCache, based on a synchronized LinkedHashMap,
82 LFUCache and FastLRUCache, based on a ConcurrentHashMap, and CaffeineCache -
83 a modern and robust cache implementation. Note that in Solr 9.0
84 only CaffeineCache will be available, other implementations are now
85 deprecated.
86
87 FastLRUCache has faster gets and slower puts in single
88 threaded operation and thus is generally faster than LRUCache
89 when the hit ratio of the cache is high (> 75%), and may be
90 faster under other scenarios on multi-cpu systems.
91 -->
92
93 <!-- Filter Cache
94
95 Cache used by SolrIndexSearcher for filters (DocSets),
96 unordered sets of *all* documents that match a query. When a
97 new searcher is opened, its caches may be prepopulated or
98 "autowarmed" using data from caches in the old searcher.
99 autowarmCount is the number of items to prepopulate. For
100 LRUCache, the autowarmed items will be the most recently
101 accessed items.
102
103 Parameters:
104 class - the SolrCache implementation LRUCache or
105 (LRUCache or FastLRUCache)
106 size - the maximum number of entries in the cache
107 initialSize - the initial capacity (number of entries) of
108 the cache. (see java.util.HashMap)
109 autowarmCount - the number of entries to prepopulate from
110 and old cache.
111 maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
112 to occupy. Note that when this option is specified, the size
113 and initialSize parameters are ignored.
114 -->
115 <filterCache class="solr.FastLRUCache"
116 enabled="${filterCache.enabled:false}"
117 size="512"
118 initialSize="512"
119 autowarmCount="0"/>
120
121 <!-- Query Result Cache
122
123 Caches results of searches - ordered lists of document ids
124 (DocList) based on a query, a sort, and the range of documents requested.
125 Additional supported parameter by LRUCache:
126 maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
127 to occupy
128 -->
129 <queryResultCache class="solr.LRUCache"
130 enabled="${queryResultCache.enabled:false}"
131 size="512"
132 initialSize="512"
133 autowarmCount="0"/>
134
135 <!-- Document Cache
136
137 Caches Lucene Document objects (the stored fields for each
138 document). Since Lucene internal document ids are transient,
139 this cache will not be autowarmed.
140 -->
141 <documentCache class="solr.LRUCache"
142 size="512"
143 initialSize="512"
144 autowarmCount="0"/>
145
146 <!-- custom cache currently used by block join -->
147 <cache name="perSegFilter"
148 class="solr.search.LRUCache"
149 size="10"
150 initialSize="0"
151 autowarmCount="10"
152 regenerator="solr.NoOpRegenerator" />
153
154 <!-- Field Value Cache
155
156 Cache used to hold field values that are quickly accessible
157 by document id. The fieldValueCache is created by default
158 even if not configured here.
159 -->
160 <!--
161 <fieldValueCache class="solr.FastLRUCache"
162 size="512"
163 autowarmCount="128"
164 showItems="32" />
165 -->
166
167 <!-- Custom Cache
168
169 Example of a generic cache. These caches may be accessed by
170 name through SolrIndexSearcher.getCache(),cacheLookup(), and
171 cacheInsert(). The purpose is to enable easy caching of
172 user/application level data. The regenerator argument should
173 be specified as an implementation of solr.CacheRegenerator
174 if autowarming is desired.
175 -->
176 <!--
177 <cache name="myUserCache"
178 class="solr.LRUCache"
179 size="4096"
180 initialSize="1024"
181 autowarmCount="1024"
182 regenerator="com.mycompany.MyRegenerator"
183 />
184 -->
185
186
187 <!-- Lazy Field Loading
188
189 If true, stored fields that are not requested will be loaded
190 lazily. This can result in a significant speed improvement
191 if the usual case is to not load all stored fields,
192 especially if the skipped fields are large compressed text
193 fields.
194 -->
195 <enableLazyFieldLoading>true</enableLazyFieldLoading>
196
197 <!-- Use Filter For Sorted Query
198
199 A possible optimization that attempts to use a filter to
200 satisfy a search. If the requested sort does not include
201 score, then the filterCache will be checked for a filter
202 matching the query. If found, the filter will be used as the
203 source of document ids, and then the sort will be applied to
204 that.
205
206 For most situations, this will not be useful unless you
207 frequently get the same search repeatedly with different sort
208 options, and none of them ever use "score"
209 -->
210 <!--
211 <useFilterForSortedQuery>true</useFilterForSortedQuery>
212 -->
213
214 <!-- Result Window Size
215
216 An optimization for use with the queryResultCache. When a search
217 is requested, a superset of the requested number of document ids
218 are collected. For example, if a search for a particular query
219 requests matching documents 10 through 19, and queryWindowSize is 50,
220 then documents 0 through 49 will be collected and cached. Any further
221 requests in that range can be satisfied via the cache.
222 -->
223 <queryResultWindowSize>20</queryResultWindowSize>
224
225 <!-- Maximum number of documents to cache for any entry in the
226 queryResultCache.
227 -->
228 <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
229
230 <!-- Query Related Event Listeners
231
232 Various IndexSearcher related events can trigger Listeners to
233 take actions.
234
235 newSearcher - fired whenever a new searcher is being prepared
236 and there is a current searcher handling requests (aka
237 registered). It can be used to prime certain caches to
238 prevent long request times for certain requests.
239
240 firstSearcher - fired whenever a new searcher is being
241 prepared but there is no current registered searcher to handle
242 requests or to gain autowarming data from.
243
244
245 -->
246 <!-- QuerySenderListener takes an array of NamedList and executes a
247 local query request for each NamedList in sequence.
248 -->
249 <listener event="newSearcher" class="solr.QuerySenderListener">
250 <arr name="queries">
251 <!--
252 <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
253 <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
254 -->
255 </arr>
256 </listener>
257 <listener event="firstSearcher" class="solr.QuerySenderListener">
258 <arr name="queries">
259 <!--
260 <lst>
261 <str name="q">static firstSearcher warming in solrconfig.xml</str>
262 </lst>
263 -->
264 </arr>
265 </listener>
266
267 <!-- Use Cold Searcher
268
269 If a search request comes in and there is no current
270 registered searcher, then immediately register the still
271 warming searcher and use it. If "false" then all requests
272 will block until the first searcher is done warming.
273 -->
274 <useColdSearcher>false</useColdSearcher>
275
276 </query>
277
278
279 <!-- Request Dispatcher
280
281 This section contains instructions for how the SolrDispatchFilter
282 should behave when processing requests for this SolrCore.
283
284 -->
285 <requestDispatcher>
286 <!-- Request Parsing
287
288 These settings indicate how Solr Requests may be parsed, and
289 what restrictions may be placed on the ContentStreams from
290 those requests
291
292 enableRemoteStreaming - enables use of the stream.file
293 and stream.url parameters for specifying remote streams.
294
295 multipartUploadLimitInKB - specifies the max size (in KiB) of
296 Multipart File Uploads that Solr will allow in a Request.
297
298 formdataUploadLimitInKB - specifies the max size (in KiB) of
299 form data (application/x-www-form-urlencoded) sent via
300 POST. You can use POST to pass request parameters not
301 fitting into the URL.
302
303 addHttpRequestToContext - if set to true, it will instruct
304 the requestParsers to include the original HttpServletRequest
305 object in the context map of the SolrQueryRequest under the
306 key "httpRequest". It will not be used by any of the existing
307 Solr components, but may be useful when developing custom
308 plugins.
309
310 *** WARNING ***
311 Before enabling remote streaming, you should make sure your
312 system has authentication enabled.
313
314 <requestParsers enableRemoteStreaming="false"
315 multipartUploadLimitInKB="-1"
316 formdataUploadLimitInKB="-1"
317 addHttpRequestToContext="false"/>
318 -->
319
320 <!-- HTTP Caching
321
322 Set HTTP caching related parameters (for proxy caches and clients).
323
324 The options below instruct Solr not to output any HTTP Caching
325 related headers
326 -->
327 <httpCaching never304="false" />
328 <!-- If you include a <cacheControl> directive, it will be used to
329 generate a Cache-Control header (as well as an Expires header
330 if the value contains "max-age=")
331
332 By default, no Cache-Control header is generated.
333
334 You can use the <cacheControl> option even if you have set
335 never304="true"
336 -->
337 <!--
338 <httpCaching never304="true" >
339 <cacheControl>max-age=30, public</cacheControl>
340 </httpCaching>
341 -->
342 <!-- To enable Solr to respond with automatically generated HTTP
343 Caching headers, and to response to Cache Validation requests
344 correctly, set the value of never304="false"
345
346 This will cause Solr to generate Last-Modified and ETag
347 headers based on the properties of the Index.
348
349 The following options can also be specified to affect the
350 values of these headers...
351
352 lastModFrom - the default value is "openTime" which means the
353 Last-Modified value (and validation against If-Modified-Since
354 requests) will all be relative to when the current Searcher
355 was opened. You can change it to lastModFrom="dirLastMod" if
356 you want the value to exactly correspond to when the physical
357 index was last modified.
358
359 etagSeed="..." is an option you can change to force the ETag
360 header (and validation against If-None-Match requests) to be
361 different even if the index has not changed (ie: when making
362 significant changes to your config file)
363
364 (lastModifiedFrom and etagSeed are both ignored if you use
365 the never304="true" option)
366 -->
367 <!--
368 <httpCaching lastModifiedFrom="openTime"
369 etagSeed="Solr">
370 <cacheControl>max-age=30, public</cacheControl>
371 </httpCaching>
372 -->
373 </requestDispatcher>
374
375 <!-- Request Handlers
376
377 http://wiki.apache.org/solr/SolrRequestHandler
378
379 Incoming queries will be dispatched to a specific handler by name
380 based on the path specified in the request.
381
382 If a Request Handler is declared with startup="lazy", then it will
383 not be initialized until the first request that uses it.
384
385 -->
386 <!-- SearchHandler
387
388 http://wiki.apache.org/solr/SearchHandler
389
390 For processing Search Queries, the primary Request Handler
391 provided with Solr is "SearchHandler" It delegates to a sequent
392 of SearchComponents (see below) and supports distributed
393 queries across multiple shards
394 -->
395 <requestHandler name="/select" class="solr.SearchHandler">
396 <!-- default values for query parameters can be specified, these
397 will be overridden by parameters in the request
398 -->
399 <lst name="defaults">
400 <str name="echoParams">explicit</str>
401 <int name="rows">10</int>
402 <!-- Default search field
403 <str name="df">text</str>
404 -->
405 <!-- Change from JSON to XML format (the default prior to Solr 7.0)
406 <str name="wt">xml</str>
407 -->
408 </lst>
409 <!-- In addition to defaults, "appends" params can be specified
410 to identify values which should be appended to the list of
411 multi-val params from the query (or the existing "defaults").
412 -->
413 <!-- In this example, the param "fq=instock:true" would be appended to
414 any query time fq params the user may specify, as a mechanism for
415 partitioning the index, independent of any user selected filtering
416 that may also be desired (perhaps as a result of faceted searching).
417
418 NOTE: there is *absolutely* nothing a client can do to prevent these
419 "appends" values from being used, so don't use this mechanism
420 unless you are sure you always want it.
421 -->
422 <!--
423 <lst name="appends">
424 <str name="fq">inStock:true</str>
425 </lst>
426 -->
427 <!-- "invariants" are a way of letting the Solr maintainer lock down
428 the options available to Solr clients. Any params values
429 specified here are used regardless of what values may be specified
430 in either the query, the "defaults", or the "appends" params.
431
432 In this example, the facet.field and facet.query params would
433 be fixed, limiting the facets clients can use. Faceting is
434 not turned on by default - but if the client does specify
435 facet=true in the request, these are the only facets they
436 will be able to see counts for; regardless of what other
437 facet.field or facet.query params they may specify.
438
439 NOTE: there is *absolutely* nothing a client can do to prevent these
440 "invariants" values from being used, so don't use this mechanism
441 unless you are sure you always want it.
442 -->
443 <!--
444 <lst name="invariants">
445 <str name="facet.field">cat</str>
446 <str name="facet.field">manu_exact</str>
447 <str name="facet.query">price:[* TO 500]</str>
448 <str name="facet.query">price:[500 TO *]</str>
449 </lst>
450 -->
451 <!-- If the default list of SearchComponents is not desired, that
452 list can either be overridden completely, or components can be
453 prepended or appended to the default list. (see below)
454 -->
455 <!--
456 <arr name="components">
457 <str>nameOfCustomComponent1</str>
458 <str>nameOfCustomComponent2</str>
459 </arr>
460 -->
461 </requestHandler>
462
463 <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
464
465 <lst name="invariants">
466
467 <str name="q">Ping</str>
468
469 </lst>
470
471 <lst name="defaults">
472
473 <str name="echoParams">all</str>
474
475 <str name="df">article</str>
476
477 </lst>
478
479 <str name="healthcheckFile">server-enabled.txt</str>
480
481</requestHandler>
482
483
484
485 <!-- A request handler that returns indented JSON by default -->
486 <requestHandler name="/query" class="solr.SearchHandler">
487 <lst name="defaults">
488 <str name="echoParams">explicit</str>
489 <str name="wt">json</str>
490 <str name="indent">true</str>
491 </lst>
492 </requestHandler>
493
494 <initParams path="/update/**,/query,/select,/spell">
495 <lst name="defaults">
496 <str name="df">_text_</str>
497 </lst>
498 </initParams>
499
500 <!-- Search Components
501
502 Search components are registered to SolrCore and used by
503 instances of SearchHandler (which can access them by name)
504
505 By default, the following components are available:
506
507 <searchComponent name="query" class="solr.QueryComponent" />
508 <searchComponent name="facet" class="solr.FacetComponent" />
509 <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
510 <searchComponent name="highlight" class="solr.HighlightComponent" />
511 <searchComponent name="stats" class="solr.StatsComponent" />
512 <searchComponent name="debug" class="solr.DebugComponent" />
513
514 Default configuration in a requestHandler would look like:
515
516 <arr name="components">
517 <str>query</str>
518 <str>facet</str>
519 <str>mlt</str>
520 <str>highlight</str>
521 <str>stats</str>
522 <str>debug</str>
523 </arr>
524
525 If you register a searchComponent to one of the standard names,
526 that will be used instead of the default.
527
528 To insert components before or after the 'standard' components, use:
529
530 <arr name="first-components">
531 <str>myFirstComponentName</str>
532 </arr>
533
534 <arr name="last-components">
535 <str>myLastComponentName</str>
536 </arr>
537
538 NOTE: The component registered with the name "debug" will
539 always be executed after the "last-components"
540
541 -->
542
543 <!-- Spell Check
544
545 The spell check component can return a list of alternative spelling
546 suggestions.
547
548 http://wiki.apache.org/solr/SpellCheckComponent
549 -->
550 <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
551
552 <str name="queryAnalyzerFieldType">text_general</str>
553
554 <!-- Multiple "Spell Checkers" can be declared and used by this
555 component
556 -->
557
558 <!-- a spellchecker built from a field of the main index -->
559 <lst name="spellchecker">
560 <str name="name">default</str>
561 <str name="field">_text_</str>
562 <str name="classname">solr.DirectSolrSpellChecker</str>
563 <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
564 <str name="distanceMeasure">internal</str>
565 <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
566 <float name="accuracy">0.5</float>
567 <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
568 <int name="maxEdits">2</int>
569 <!-- the minimum shared prefix when enumerating terms -->
570 <int name="minPrefix">1</int>
571 <!-- maximum number of inspections per result. -->
572 <int name="maxInspections">5</int>
573 <!-- minimum length of a query term to be considered for correction -->
574 <int name="minQueryLength">4</int>
575 <!-- maximum threshold of documents a query term can appear to be considered for correction -->
576 <float name="maxQueryFrequency">0.01</float>
577 <!-- uncomment this to require suggestions to occur in 1% of the documents
578 <float name="thresholdTokenFrequency">.01</float>
579 -->
580 </lst>
581
582 <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
583 <!--
584 <lst name="spellchecker">
585 <str name="name">wordbreak</str>
586 <str name="classname">solr.WordBreakSolrSpellChecker</str>
587 <str name="field">name</str>
588 <str name="combineWords">true</str>
589 <str name="breakWords">true</str>
590 <int name="maxChanges">10</int>
591 </lst>
592 -->
593 </searchComponent>
594
595 <!-- A request handler for demonstrating the spellcheck component.
596
597 NOTE: This is purely as an example. The whole purpose of the
598 SpellCheckComponent is to hook it into the request handler that
599 handles your normal user queries so that a separate request is
600 not needed to get suggestions.
601
602 IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
603 NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
604
605 See http://wiki.apache.org/solr/SpellCheckComponent for details
606 on the request parameters.
607 -->
608 <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
609 <lst name="defaults">
610 <!-- Solr will use suggestions from both the 'default' spellchecker
611 and from the 'wordbreak' spellchecker and combine them.
612 collations (re-written queries) can include a combination of
613 corrections from both spellcheckers -->
614 <str name="spellcheck.dictionary">default</str>
615 <str name="spellcheck">on</str>
616 <str name="spellcheck.extendedResults">true</str>
617 <str name="spellcheck.count">10</str>
618 <str name="spellcheck.alternativeTermCount">5</str>
619 <str name="spellcheck.maxResultsForSuggest">5</str>
620 <str name="spellcheck.collate">true</str>
621 <str name="spellcheck.collateExtendedResults">true</str>
622 <str name="spellcheck.maxCollationTries">10</str>
623 <str name="spellcheck.maxCollations">5</str>
624 </lst>
625 <arr name="last-components">
626 <str>spellcheck</str>
627 </arr>
628 </requestHandler>
629
630 <!-- Terms Component
631
632 http://wiki.apache.org/solr/TermsComponent
633
634 A component to return terms and document frequency of those
635 terms
636 -->
637 <searchComponent name="terms" class="solr.TermsComponent"/>
638
639 <!-- A request handler for demonstrating the terms component -->
640 <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
641 <lst name="defaults">
642 <bool name="terms">true</bool>
643 <bool name="distrib">false</bool>
644 </lst>
645 <arr name="components">
646 <str>terms</str>
647 </arr>
648 </requestHandler>
649
650 <!-- Highlighting Component
651
652 http://wiki.apache.org/solr/HighlightingParameters
653 -->
654 <searchComponent class="solr.HighlightComponent" name="highlight">
655 <highlighting>
656 <!-- Configure the standard fragmenter -->
657 <!-- This could most likely be commented out in the "default" case -->
658 <fragmenter name="gap"
659 default="true"
660 class="solr.highlight.GapFragmenter">
661 <lst name="defaults">
662 <int name="hl.fragsize">100</int>
663 </lst>
664 </fragmenter>
665
666 <!-- A regular-expression-based fragmenter
667 (for sentence extraction)
668 -->
669 <fragmenter name="regex"
670 class="solr.highlight.RegexFragmenter">
671 <lst name="defaults">
672 <!-- slightly smaller fragsizes work better because of slop -->
673 <int name="hl.fragsize">70</int>
674 <!-- allow 50% slop on fragment sizes -->
675 <float name="hl.regex.slop">0.5</float>
676 <!-- a basic sentence pattern -->
677 <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
678 </lst>
679 </fragmenter>
680
681 <!-- Configure the standard formatter -->
682 <formatter name="html"
683 default="true"
684 class="solr.highlight.HtmlFormatter">
685 <lst name="defaults">
686 <str name="hl.simple.pre"><![CDATA[<em>]]></str>
687 <str name="hl.simple.post"><![CDATA[</em>]]></str>
688 </lst>
689 </formatter>
690
691 <!-- Configure the standard encoder -->
692 <encoder name="html"
693 class="solr.highlight.HtmlEncoder" />
694
695 <!-- Configure the standard fragListBuilder -->
696 <fragListBuilder name="simple"
697 class="solr.highlight.SimpleFragListBuilder"/>
698
699 <!-- Configure the single fragListBuilder -->
700 <fragListBuilder name="single"
701 class="solr.highlight.SingleFragListBuilder"/>
702
703 <!-- Configure the weighted fragListBuilder -->
704 <fragListBuilder name="weighted"
705 default="true"
706 class="solr.highlight.WeightedFragListBuilder"/>
707
708 <!-- default tag FragmentsBuilder -->
709 <fragmentsBuilder name="default"
710 default="true"
711 class="solr.highlight.ScoreOrderFragmentsBuilder">
712 <!--
713 <lst name="defaults">
714 <str name="hl.multiValuedSeparatorChar">/</str>
715 </lst>
716 -->
717 </fragmentsBuilder>
718
719 <!-- multi-colored tag FragmentsBuilder -->
720 <fragmentsBuilder name="colored"
721 class="solr.highlight.ScoreOrderFragmentsBuilder">
722 <lst name="defaults">
723 <str name="hl.tag.pre"><![CDATA[
724 <b style="background:yellow">,<b style="background:lawgreen">,
725 <b style="background:aquamarine">,<b style="background:magenta">,
726 <b style="background:palegreen">,<b style="background:coral">,
727 <b style="background:wheat">,<b style="background:khaki">,
728 <b style="background:lime">,<b style="background:deepskyblue">]]></str>
729 <str name="hl.tag.post"><![CDATA[</b>]]></str>
730 </lst>
731 </fragmentsBuilder>
732
733 <boundaryScanner name="default"
734 default="true"
735 class="solr.highlight.SimpleBoundaryScanner">
736 <lst name="defaults">
737 <str name="hl.bs.maxScan">10</str>
738 <str name="hl.bs.chars">.,!? 	 </str>
739 </lst>
740 </boundaryScanner>
741
742 <boundaryScanner name="breakIterator"
743 class="solr.highlight.BreakIteratorBoundaryScanner">
744 <lst name="defaults">
745 <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
746 <str name="hl.bs.type">WORD</str>
747 <!-- language and country are used when constructing Locale object. -->
748 <!-- And the Locale object will be used when getting instance of BreakIterator -->
749 <str name="hl.bs.language">en</str>
750 <str name="hl.bs.country">US</str>
751 </lst>
752 </boundaryScanner>
753 </highlighting>
754 </searchComponent>
755
756 <!-- Update Processors
757
758 Chains of Update Processor Factories for dealing with Update
759 Requests can be declared, and then used by name in Update
760 Request Processors
761
762 http://wiki.apache.org/solr/UpdateRequestProcessor
763
764 -->
765
766 <!-- Add unknown fields to the schema
767
768 Field type guessing update processors that will
769 attempt to parse string-typed field values as Booleans, Longs,
770 Doubles, or Dates, and then add schema fields with the guessed
771 field types. Text content will be indexed as "text_general" as
772 well as a copy to a plain string version in *_str.
773
774 These require that the schema is both managed and mutable, by
775 declaring schemaFactory as ManagedIndexSchemaFactory, with
776 mutable specified as true.
777
778 See http://wiki.apache.org/solr/GuessingFieldTypes
779 -->
780 <updateProcessor class="solr.UUIDUpdateProcessorFactory" name="uuid"/>
781 <updateProcessor class="solr.RemoveBlankFieldUpdateProcessorFactory" name="remove-blank"/>
782 <updateProcessor class="solr.FieldNameMutatingUpdateProcessorFactory" name="field-name-mutating">
783 <str name="pattern">[^\w-\.]</str>
784 <str name="replacement">_</str>
785 </updateProcessor>
786 <updateProcessor class="solr.ParseBooleanFieldUpdateProcessorFactory" name="parse-boolean"/>
787 <updateProcessor class="solr.ParseLongFieldUpdateProcessorFactory" name="parse-long"/>
788 <updateProcessor class="solr.ParseDoubleFieldUpdateProcessorFactory" name="parse-double"/>
789 <updateProcessor class="solr.ParseDateFieldUpdateProcessorFactory" name="parse-date">
790 <arr name="format">
791 <str>yyyy-MM-dd['T'[HH:mm[:ss[.SSS]][z</str>
792 <str>yyyy-MM-dd['T'[HH:mm[:ss[,SSS]][z</str>
793 <str>yyyy-MM-dd HH:mm[:ss[.SSS]][z</str>
794 <str>yyyy-MM-dd HH:mm[:ss[,SSS]][z</str>
795 <str>[EEE, ]dd MMM yyyy HH:mm[:ss] z</str>
796 <str>EEEE, dd-MMM-yy HH:mm:ss z</str>
797 <str>EEE MMM ppd HH:mm:ss [z ]yyyy</str>
798 </arr>
799 </updateProcessor>
800 <updateProcessor class="solr.AddSchemaFieldsUpdateProcessorFactory" name="add-schema-fields">
801 <lst name="typeMapping">
802 <str name="valueClass">java.lang.String</str>
803 <str name="fieldType">text_general</str>
804 <lst name="copyField">
805 <str name="dest">*_str</str>
806 <int name="maxChars">256</int>
807 </lst>
808 <!-- Use as default mapping instead of defaultFieldType -->
809 <bool name="default">true</bool>
810 </lst>
811 <lst name="typeMapping">
812 <str name="valueClass">java.lang.Boolean</str>
813 <str name="fieldType">booleans</str>
814 </lst>
815 <lst name="typeMapping">
816 <str name="valueClass">java.util.Date</str>
817 <str name="fieldType">pdates</str>
818 </lst>
819 <lst name="typeMapping">
820 <str name="valueClass">java.lang.Long</str>
821 <str name="valueClass">java.lang.Integer</str>
822 <str name="fieldType">plongs</str>
823 </lst>
824 <lst name="typeMapping">
825 <str name="valueClass">java.lang.Number</str>
826 <str name="fieldType">pdoubles</str>
827 </lst>
828 </updateProcessor>
829
830 <!-- The update.autoCreateFields property can be turned to false to disable schemaless mode -->
831 <updateRequestProcessorChain name="add-unknown-fields-to-the-schema" default="${update.autoCreateFields:true}"
832 processor="uuid,remove-blank,field-name-mutating,parse-boolean,parse-long,parse-double,parse-date,add-schema-fields">
833 <processor class="solr.LogUpdateProcessorFactory"/>
834 <processor class="solr.DistributedUpdateProcessorFactory"/>
835 <processor class="solr.RunUpdateProcessorFactory"/>
836 </updateRequestProcessorChain>
837
838 <!-- Deduplication
839
840 An example dedup update processor that creates the "id" field
841 on the fly based on the hash code of some other fields. This
842 example has overwriteDupes set to false since we are using the
843 id field as the signatureField and Solr will maintain
844 uniqueness based on that anyway.
845
846 -->
847 <!--
848 <updateRequestProcessorChain name="dedupe">
849 <processor class="solr.processor.SignatureUpdateProcessorFactory">
850 <bool name="enabled">true</bool>
851 <str name="signatureField">id</str>
852 <bool name="overwriteDupes">false</bool>
853 <str name="fields">name,features,cat</str>
854 <str name="signatureClass">solr.processor.Lookup3Signature</str>
855 </processor>
856 <processor class="solr.LogUpdateProcessorFactory" />
857 <processor class="solr.RunUpdateProcessorFactory" />
858 </updateRequestProcessorChain>
859 -->
860
861 <!-- Response Writers
862
863 http://wiki.apache.org/solr/QueryResponseWriter
864
865 Request responses will be written using the writer specified by
866 the 'wt' request parameter matching the name of a registered
867 writer.
868
869 The "default" writer is the default and will be used if 'wt' is
870 not specified in the request.
871 -->
872 <!-- The following response writers are implicitly configured unless
873 overridden...
874 -->
875 <!--
876 <queryResponseWriter name="xml"
877 default="true"
878 class="solr.XMLResponseWriter" />
879 <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
880 <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
881 <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
882 <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
883 <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
884 <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
885 <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
886 -->
887
888 <queryResponseWriter name="json" class="solr.JSONResponseWriter">
889 <!-- For the purposes of the tutorial, JSON responses are written as
890 plain text so that they are easy to read in *any* browser.
891 If you expect a MIME type of "application/json" just remove this override.
892 -->
893 <str name="content-type">text/plain; charset=UTF-8</str>
894 </queryResponseWriter>
895
896 <!-- Query Parsers
897
898 https://lucene.apache.org/solr/guide/query-syntax-and-parsing.html
899
900 Multiple QParserPlugins can be registered by name, and then
901 used in either the "defType" param for the QueryComponent (used
902 by SearchHandler) or in LocalParams
903 -->
904 <!-- example of registering a query parser -->
905 <!--
906 <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
907 -->
908
909 <!-- Function Parsers
910
911 http://wiki.apache.org/solr/FunctionQuery
912
913 Multiple ValueSourceParsers can be registered by name, and then
914 used as function names when using the "func" QParser.
915 -->
916 <!-- example of registering a custom function parser -->
917 <!--
918 <valueSourceParser name="myfunc"
919 class="com.mycompany.MyValueSourceParser" />
920 -->
921
922
923 <!-- Document Transformers
924 http://wiki.apache.org/solr/DocTransformers
925 -->
926 <!--
927 Could be something like:
928 <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
929 <int name="connection">jdbc://....</int>
930 </transformer>
931
932 To add a constant value to all docs, use:
933 <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
934 <int name="value">5</int>
935 </transformer>
936
937 If you want the user to still be able to change it with _value:something_ use this:
938 <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
939 <double name="defaultValue">5</double>
940 </transformer>
941
942 If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
943 EditorialMarkerFactory will do exactly that:
944 <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
945 -->
946</config>
947