Commit 803936773aea934bff8a5790bfa1d761c577c04e

Authored by Matthijs Brouwer
Committed by GitHub
2 parents b0a98eed e9beaa85

Merge branch 'master' into feature/maven-directory-layout

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