Advertisement
Guest User

schema and solrConfig

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