mirror of https://github.com/apache/lucene.git
SOLR-4942: test improvements to randomize use of compound files
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1495668 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fab1b8babf
commit
be9bf006c2
|
@ -235,6 +235,8 @@ Other Changes
|
|||
* SOLR-4931: SolrDeletionPolicy onInit and onCommit methods changed to override
|
||||
exact signatures (with generics) from IndexDeletionPolicy (shalin)
|
||||
|
||||
* SOLR-4942: test improvements to randomize use of compound files (hosman)
|
||||
|
||||
================== 4.3.1 ==================
|
||||
|
||||
Versions of Major Components
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
</config>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<!-- Enables JMX if and only if an existing MBeanServer is found, use
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<!-- Used to specify an alternate directory to hold all index data
|
||||
other than the default ./data under the Solr home.
|
||||
|
@ -26,8 +29,6 @@
|
|||
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
<!-- <indexConfig> section could go here, but we want the defaults -->
|
||||
|
||||
<!-- the default high-performance update handler -->
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<!-- Used to specify an alternate directory to hold all index data
|
||||
other than the default ./data under the Solr home.
|
||||
|
@ -26,8 +29,6 @@
|
|||
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
<!-- <indexConfig> section could go here, but we want the defaults -->
|
||||
|
||||
<!-- the default high-performance update handler -->
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<!-- the default high-performance update handler -->
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<!-- Used to specify an alternate directory to hold all index data
|
||||
other than the default ./data under the Solr home.
|
||||
|
@ -26,8 +29,6 @@
|
|||
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
<!-- <indexConfig> section could go here, but we want the defaults -->
|
||||
|
||||
<!-- the default high-performance update handler -->
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<jmx />
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<!-- Used to specify an alternate directory to hold all index data.
|
||||
It defaults to "index" if not present, and should probably
|
||||
|
@ -27,8 +30,6 @@
|
|||
<dataDir>${solr.data.dir:}</dataDir>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
<!-- <indexConfig> section could go here, but we want the defaults -->
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
||||
<!-- autocommit pending docs if certain criteria are met
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
<config>
|
||||
|
||||
<jmx />
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<!-- Used to specify an alternate directory to hold all index data.
|
||||
It defaults to "index" if not present, and should probably
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
-->
|
||||
<config xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
<!--
|
||||
lib directives can be used to instruct Solr to load an Jars
|
||||
identified and use them to resolve any "plugins" specified in your
|
||||
|
@ -68,7 +71,6 @@
|
|||
-->
|
||||
<dataDir>${solr.data.dir:}</dataDir>
|
||||
|
||||
<!-- <indexConfig> section could go here, but we want the defaults -->
|
||||
|
||||
<!--
|
||||
Enables JMX if and only if an existing MBeanServer is found, use
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
-->
|
||||
<config xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
<!--
|
||||
lib directives can be used to instruct Solr to load an Jars
|
||||
identified and use them to resolve any "plugins" specified in your
|
||||
|
@ -68,8 +71,6 @@
|
|||
-->
|
||||
<dataDir>${solr.data.dir:}</dataDir>
|
||||
|
||||
<!-- <indexConfig> section could go here, but we want the defaults -->
|
||||
|
||||
<!--
|
||||
Enables JMX if and only if an existing MBeanServer is found, use
|
||||
this if you want to configure JMX through JVM parameters. Remove
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
-->
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<lib dir="../../contrib/velocity/lib" />
|
||||
<lib dir="../../dist/" regex="solr-velocity-\d.*\.jar" />
|
||||
|
@ -31,9 +34,6 @@
|
|||
<directoryFactory name="DirectoryFactory"
|
||||
class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
|
||||
|
||||
|
||||
<!-- <indexConfig> section could go here, but we want the defaults -->
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
</updateHandler>
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<queryParser name="foo" class="FooQParserPlugin"/>
|
||||
<!-- override the default "lucene" qparser -->
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
<directoryFactory name="DirectoryFactory" class="org.apache.solr.core.AlternateDirectoryTest$TestFSDirectoryFactory"></directoryFactory>
|
||||
<indexReaderFactory name="IndexReaderFactory" class="org.apache.solr.core.AlternateDirectoryTest$TestIndexReaderFactory"></indexReaderFactory >
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<dataDir>${solr.data.dir:}</dataDir>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
</config>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
-->
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<query>
|
||||
<cache name="lfuCacheDecayFalse"
|
||||
|
@ -35,4 +36,4 @@
|
|||
size="10"
|
||||
initialSize="9" />
|
||||
</query>
|
||||
</config>
|
||||
</config>
|
||||
|
|
|
@ -17,21 +17,12 @@
|
|||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!-- This is a "kitchen sink" config file that tests can use.
|
||||
When writting a new test, feel free to add *new* items (plugins,
|
||||
config options, etc...) as long as they don't break any existing
|
||||
tests. if you need to test something esoteric please add a new
|
||||
"solrconfig-your-esoteric-purpose.xml" config file.
|
||||
|
||||
Note in particular that this test is used by MinimalSchemaTest so
|
||||
Anything added to this file needs to work correctly even if there
|
||||
is now uniqueKey or defaultSearch Field.
|
||||
-->
|
||||
|
||||
<config>
|
||||
|
||||
<jmx />
|
||||
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
||||
<!-- Used to specify an alternate directory to hold all index data.
|
||||
It defaults to "index" if not present, and should probably
|
||||
not be changed if replication is in use. -->
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!--
|
||||
|
||||
an "empty" solrconfig for testing default behavior
|
||||
|
||||
DO NOT ADD THINGS TO THIS CONFIG!
|
||||
|
||||
NOTE: Most tests should not use this config unless the *explicitly* want
|
||||
to test default behavior. Most tests should use either...
|
||||
|
||||
solrconfig-minimal.xml
|
||||
solrconfig-basic.xml
|
||||
solrconfig.xml
|
||||
|
||||
...in order to get better randomization of various config options.
|
||||
|
||||
-->
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion><!--
|
||||
|
||||
|
||||
DO NOT ADD THINGS TO THIS CONFIG!
|
||||
|
||||
|
||||
--></config>
|
|
@ -17,7 +17,6 @@
|
|||
limitations under the License.
|
||||
-->
|
||||
|
||||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
@ -26,6 +25,7 @@
|
|||
<requestHandler name="standard" class="solr.StandardRequestHandler"/>
|
||||
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<deletionPolicy class="solr.SolrDeletionPolicy">
|
||||
<str name="keepOptimizedOnly">true</str>
|
||||
<str name="maxCommitsToKeep">3</str>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<deletionPolicy class="org.apache.solr.core.FakeDeletionPolicy">
|
||||
<str name="var1">value1</str>
|
||||
<str name="var2">value2</str>
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<lockType>single</lockType>
|
||||
</indexConfig>
|
||||
|
||||
|
@ -66,10 +67,8 @@
|
|||
</listener>
|
||||
-->
|
||||
|
||||
|
||||
</updateHandler>
|
||||
|
||||
|
||||
<query>
|
||||
<!-- Maximum number of clauses in a boolean query... can affect
|
||||
range or wildcard queries that expand to big boolean
|
||||
|
@ -77,7 +76,6 @@
|
|||
-->
|
||||
<maxBooleanClauses>1024</maxBooleanClauses>
|
||||
|
||||
|
||||
<!-- Cache specification for Filters or DocSets - unordered set of *all* documents
|
||||
that match a particular query.
|
||||
-->
|
||||
|
@ -108,19 +106,16 @@
|
|||
<!-- set maxSize artificially low to exercise both types of sets -->
|
||||
<HashDocSet maxSize="3" loadFactor="0.75"/>
|
||||
|
||||
|
||||
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
|
||||
into cached filters if the number of docs selected by the clause exceeds
|
||||
the threshold (represented as a fraction of the total index)
|
||||
-->
|
||||
<boolTofilterOptimizer enabled="false" cacheSize="32" threshold=".05"/>
|
||||
|
||||
|
||||
</query>
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
|
||||
<!-- test elevation -->
|
||||
<searchComponent name="elevate" class="org.apache.solr.handler.component.QueryElevationComponent" >
|
||||
<str name="queryFieldType">string</str>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
@ -45,7 +46,6 @@
|
|||
<requestHandler name="disabled" class="solr.StandardRequestHandler" enable="false"/>
|
||||
<requestHandler name="enabled" class="solr.StandardRequestHandler" enable="true"/>
|
||||
|
||||
|
||||
<!-- test query parameter defaults -->
|
||||
<requestHandler name="lazy" class="solr.StandardRequestHandler" startup="lazy">
|
||||
</requestHandler>
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
||||
<!-- The DirectoryFactory to use for indexes.
|
||||
solr.StandardDirectoryFactory, the default, is filesystem based.
|
||||
solr.RAMDirectoryFactory is memory based and not persistent. -->
|
||||
|
@ -38,5 +40,4 @@
|
|||
<float name="nvlFloatValue">0.0</float>
|
||||
</valueSourceParser>
|
||||
|
||||
|
||||
</config>
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
||||
<!-- The DirectoryFactory to use for indexes.
|
||||
solr.StandardDirectoryFactory, the default, is filesystem based.
|
||||
solr.RAMDirectoryFactory is memory based and not persistent. -->
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<maxIndexingThreads>123</maxIndexingThreads>
|
||||
</indexConfig>
|
||||
</config>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
DO NOT ADD THINGS TO THIS CONFIG! -->
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
||||
<schemaFactory class="ManagedIndexSchemaFactory">
|
||||
<bool name="mutable">false</bool>
|
||||
<str name="managedSchemaResourceName">managed-schema</str>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<mergeFactor>7</mergeFactor>
|
||||
<useCompoundFile>true</useCompoundFile>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
setting and log a warning (instead of failing because the setter is
|
||||
gone).
|
||||
-->
|
||||
<bool name="useCompoundFile">true</bool>
|
||||
<bool name="useCompoundFile">${useCompoundFile:false}</bool>
|
||||
|
||||
</mergePolicy>
|
||||
</indexConfig>
|
||||
|
|
|
@ -28,8 +28,7 @@
|
|||
<directoryFactory name="DirectoryFactory"
|
||||
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
|
||||
|
||||
<indexConfig>
|
||||
</indexConfig>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
||||
<jmx/>
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
||||
<schemaFactory class="ManagedIndexSchemaFactory">
|
||||
<bool name="mutable">true</bool>
|
||||
<str name="managedSchemaResourceName">managed-schema</str>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<lockType>native</lockType>
|
||||
</indexConfig>
|
||||
</config>
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<!-- The DirectoryFactory to use for indexes.
|
||||
solr.StandardDirectoryFactory, the default, is filesystem based.
|
||||
solr.RAMDirectoryFactory is memory based and not persistent. -->
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<!-- solrconfig.xml for a WFST phrase suggester -->
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<dataDir>${solr.data.dir:}</dataDir>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<dataDir>${solr.data.dir:}</dataDir>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler">
|
||||
<lst name="defaults">
|
||||
|
|
|
@ -17,21 +17,6 @@
|
|||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!--
|
||||
|
||||
This is a "kitchen sink" config file that tests can use.
|
||||
When writting a new test, feel free to add *new* items (plugins,
|
||||
config options, etc...) as long as they don't break any existing
|
||||
tests. if you need to test something esoteric please add a new
|
||||
"solrconfig-your-esoteric-purpose.xml" config file.
|
||||
|
||||
Note in particular that this test is used by MinimalSchemaTest so
|
||||
Anything added to this file needs to work correctly even if there
|
||||
is now uniqueKey or defaultSearch Field.
|
||||
|
||||
|
||||
-->
|
||||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
|
@ -41,6 +26,7 @@
|
|||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy">
|
||||
<double name="maxMergeMB">32.0</double>
|
||||
</mergePolicy>
|
||||
|
|
|
@ -17,22 +17,6 @@
|
|||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!--
|
||||
|
||||
|
||||
This is a "kitchen sink" config file that tests can use.
|
||||
When writting a new test, feel free to add *new* items (plugins,
|
||||
config options, etc...) as long as they don't break any existing
|
||||
tests. if you need to test something esoteric please add a new
|
||||
"solrconfig-your-esoteric-purpose.xml" config file.
|
||||
|
||||
Note in particular that this test is used by MinimalSchemaTest so
|
||||
Anything added to this file needs to work correctly even if there
|
||||
is now uniqueKey or defaultSearch Field.
|
||||
|
||||
|
||||
-->
|
||||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
|
@ -43,6 +27,7 @@
|
|||
|
||||
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy">
|
||||
<double name="maxMergeMB">64.0</double>
|
||||
</mergePolicy>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<!-- The DirectoryFactory to use for indexes.
|
||||
solr.StandardDirectoryFactory, the default, is filesystem based.
|
||||
solr.RAMDirectoryFactory is memory based and not persistent. -->
|
||||
|
@ -49,7 +50,6 @@
|
|||
<listener event="newSearcher"
|
||||
class="org.apache.solr.core.MockEventListener" />
|
||||
|
||||
|
||||
<!-- a firstSearcher event is fired whenever a new searcher is being
|
||||
prepared but there is no current registered searcher to handle
|
||||
requests or to gain prewarming data from. -->
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<!-- The DirectoryFactory to use for indexes.
|
||||
solr.StandardDirectoryFactory, the default, is filesystem based.
|
||||
solr.RAMDirectoryFactory is memory based and not persistent. -->
|
||||
|
@ -47,7 +48,6 @@
|
|||
<listener event="newSearcher"
|
||||
class="org.apache.solr.core.MockEventListener" />
|
||||
|
||||
|
||||
<!-- a firstSearcher event is fired whenever a new searcher is being
|
||||
prepared but there is no current registered searcher to handle
|
||||
requests or to gain prewarming data from. -->
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
@ -54,7 +55,6 @@
|
|||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
|
||||
<!-- enable streaming for testing... -->
|
||||
<requestDispatcher handleSelect="true">
|
||||
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048"/>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<requestHandler name="standard"
|
||||
class="solr.StandardRequestHandler"></requestHandler>
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
-->
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
|
@ -34,7 +35,6 @@
|
|||
<processor class="solr.RunUpdateProcessorFactory" />
|
||||
</updateRequestProcessorChain>
|
||||
|
||||
|
||||
<updateRequestProcessorChain name="run-no-scripts">
|
||||
<!-- for bypassing all scripts -->
|
||||
<processor class="solr.RunUpdateProcessorFactory" />
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<lockType>simple</lockType>
|
||||
</indexConfig>
|
||||
</config>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
@ -52,7 +53,6 @@
|
|||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
|
||||
<!-- enable streaming for testing... -->
|
||||
<requestDispatcher handleSelect="true">
|
||||
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048"/>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
@ -48,7 +49,6 @@
|
|||
|
||||
</requestHandler>
|
||||
|
||||
|
||||
<!-- enable streaming for testing... -->
|
||||
<requestDispatcher handleSelect="true">
|
||||
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048"/>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>single</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<requestHandler name="standard"
|
||||
class="solr.StandardRequestHandler"></requestHandler>
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
-->
|
||||
|
||||
<config>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<!-- The DirectoryFactory to use for indexes.
|
||||
solr.StandardDirectoryFactory, the default, is filesystem based.
|
||||
solr.RAMDirectoryFactory is memory based and not persistent. -->
|
||||
|
@ -24,7 +25,6 @@
|
|||
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
</updateHandler>
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<termIndexInterval>256</termIndexInterval>
|
||||
<mergePolicy class="org.apache.lucene.index.TieredMergePolicy"/>
|
||||
<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>${solr.lock.type:native}</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<!-- an update processor the explicitly excludes distrib to test
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>${solr.lock.type:native}</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<!-- an update processor the explicitly excludes distrib to test
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
<indexConfig>
|
||||
<lockType>${solr.lock.type:native}</lockType>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
|
||||
<!-- an update processor the explicitly excludes distrib to test
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<!-- The DirectoryFactory to use for indexes.
|
||||
solr.StandardDirectoryFactory, the default, is filesystem based.
|
||||
solr.RAMDirectoryFactory is memory based and not persistent. -->
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
|
||||
<updateRequestProcessorChain name="standard">
|
||||
<processor class="solr.CustomUpdateRequestProcessorFactory" enable="false">
|
||||
<!-- this processor is not enabled, so it won't be used at all -->
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
-->
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
|
@ -53,7 +54,6 @@
|
|||
<processor class="solr.RunUpdateProcessorFactory" />
|
||||
</updateRequestProcessorChain>
|
||||
|
||||
|
||||
<updateRequestProcessorChain name="trim-all">
|
||||
<!-- no specific src field configs, so all fields should get trimmed -->
|
||||
<processor class="solr.TrimFieldUpdateProcessorFactory">
|
||||
|
@ -66,7 +66,6 @@
|
|||
</processor>
|
||||
</updateRequestProcessorChain>
|
||||
|
||||
|
||||
<updateRequestProcessorChain name="trim-most">
|
||||
<!-- all fields except the exclusions should be trimmed -->
|
||||
<processor class="solr.TrimFieldUpdateProcessorFactory">
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<mergedSegmentWarmer class="org.apache.lucene.index.SimpleMergedSegmentWarmer"/>
|
||||
</indexConfig>
|
||||
</config>
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<xi:include href="foobar-missing.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<xi:fallback>
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!--
|
||||
|
||||
A solrconfig.xml snippet containing indexConfig settings for randomized testing.
|
||||
|
||||
-->
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
|
@ -53,7 +53,7 @@
|
|||
<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
|
||||
<writeLockTimeout>1000</writeLockTimeout>
|
||||
<mergeFactor>8</mergeFactor>
|
||||
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<!-- for better multi-segment testing, we are using slower
|
||||
indexing properties of maxBufferedDocs=10 and LogDocMergePolicy.
|
||||
-->
|
||||
|
@ -104,7 +104,6 @@
|
|||
|
||||
</updateHandler>
|
||||
|
||||
|
||||
<query>
|
||||
<!-- Maximum number of clauses in a boolean query... can affect
|
||||
range or wildcard queries that expand to big boolean
|
||||
|
@ -112,7 +111,6 @@
|
|||
-->
|
||||
<maxBooleanClauses>1024</maxBooleanClauses>
|
||||
|
||||
|
||||
<!-- Cache specification for Filters or DocSets - unordered set of *all* documents
|
||||
that match a particular query.
|
||||
-->
|
||||
|
@ -149,7 +147,6 @@
|
|||
/>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<useFilterForSortedQuery>true</useFilterForSortedQuery>
|
||||
-->
|
||||
|
@ -159,14 +156,12 @@
|
|||
<!-- set maxSize artificially low to exercise both types of sets -->
|
||||
<HashDocSet maxSize="3" loadFactor="0.75"/>
|
||||
|
||||
|
||||
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
|
||||
into cached filters if the number of docs selected by the clause exceeds
|
||||
the threshold (represented as a fraction of the total index)
|
||||
-->
|
||||
<boolTofilterOptimizer enabled="false" cacheSize="32" threshold=".05"/>
|
||||
|
||||
|
||||
<!-- a newSearcher event is fired whenever a new searcher is being prepared
|
||||
and there is a current searcher handling requests (aka registered). -->
|
||||
<!-- QuerySenderListener takes an array of NamedList and executes a
|
||||
|
@ -191,7 +186,6 @@
|
|||
</listener>
|
||||
-->
|
||||
|
||||
|
||||
</query>
|
||||
|
||||
<queryResponseWriter name="xml" default="true"
|
||||
|
@ -219,7 +213,6 @@
|
|||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
|
||||
<requestHandler name="dismax" class="solr.SearchHandler" >
|
||||
<lst name="defaults">
|
||||
<str name="defType">dismax</str>
|
||||
|
@ -265,7 +258,6 @@
|
|||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
|
||||
<searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">
|
||||
<!-- This is slightly different from the field value so we can test dealing with token offset changes -->
|
||||
<str name="queryAnalyzerFieldType">lowerpunctfilt</str>
|
||||
|
@ -471,7 +463,6 @@
|
|||
</highlighting>
|
||||
</searchComponent>
|
||||
|
||||
|
||||
<!-- enable streaming for testing... -->
|
||||
<requestDispatcher handleSelect="true" >
|
||||
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
|
||||
<codecFactory class="solr.SchemaCodecFactory"/>
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
If replication is in use, this should match the replication configuration. -->
|
||||
<dataDir>${solr.data.dir:}</dataDir>
|
||||
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
||||
<!-- The DirectoryFactory to use for indexes.
|
||||
solr.StandardDirectoryFactory, the default, is filesystem based.
|
||||
solr.RAMDirectoryFactory is memory based and not persistent. -->
|
||||
|
@ -66,7 +68,6 @@
|
|||
</httpCaching>
|
||||
</requestDispatcher>
|
||||
|
||||
|
||||
<requestHandler name="standard" class="solr.SearchHandler" default="true">
|
||||
</requestHandler>
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
<lockType>single</lockType>
|
||||
</indexConfig>
|
||||
|
||||
|
@ -32,7 +33,6 @@
|
|||
<commitIntervalLowerBound>0</commitIntervalLowerBound>
|
||||
</updateHandler>
|
||||
|
||||
|
||||
<query>
|
||||
<maxBooleanClauses>1024</maxBooleanClauses>
|
||||
<useFilterForSortedQuery>true</useFilterForSortedQuery>
|
||||
|
@ -54,12 +54,9 @@
|
|||
<queryResponseWriter name="useless" class="org.apache.solr.OutputWriterTest$UselessOutputWriter" startup="lazy"/>
|
||||
<queryResponseWriter name="xslt" class="solr.XSLTResponseWriter"/>
|
||||
|
||||
|
||||
<admin>
|
||||
<defaultQuery>solr</defaultQuery>
|
||||
<gettableFiles>solrconfig.xml schema.xml</gettableFiles>
|
||||
</admin>
|
||||
|
||||
|
||||
|
||||
</config>
|
||||
|
|
|
@ -42,6 +42,7 @@ public class SolrTestCaseJ4Test extends SolrTestCaseJ4 {
|
|||
String top = SolrTestCaseJ4.TEST_HOME() + "/collection1/conf";
|
||||
FileUtils.copyFile(new File(top, "schema-tiny.xml"), new File(subHome, "schema-tiny.xml"));
|
||||
FileUtils.copyFile(new File(top, "solrconfig-minimal.xml"), new File(subHome, "solrconfig-minimal.xml"));
|
||||
FileUtils.copyFile(new File(top, "solrconfig.snippet.randomindexconfig.xml"), new File(subHome, "solrconfig.snippet.randomindexconfig.xml"));
|
||||
|
||||
FileUtils.copyDirectory(new File(tmpSolrHome, "core0"), new File(tmpSolrHome, "core1"));
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ public class CoreContainerCoreInitFailuresTest extends SolrTestCaseJ4 {
|
|||
FileUtils.write(solrXml, BAD_SOLR_XML, IOUtils.CHARSET_UTF_8.toString());
|
||||
|
||||
// our "ok" collection
|
||||
FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-basic.xml"),
|
||||
FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-defaults.xml"),
|
||||
FileUtils.getFile(solrHome, "col_ok", "conf", "solrconfig.xml"));
|
||||
FileUtils.copyFile(getFile("solr/collection1/conf/schema-minimal.xml"),
|
||||
FileUtils.getFile(solrHome, "col_ok", "conf", "schema.xml"));
|
||||
|
@ -198,7 +198,7 @@ public class CoreContainerCoreInitFailuresTest extends SolrTestCaseJ4 {
|
|||
|
||||
// -----
|
||||
// "fix" the bad collection
|
||||
FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-basic.xml"),
|
||||
FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-defaults.xml"),
|
||||
FileUtils.getFile(solrHome, "col_bad", "conf", "solrconfig.xml"));
|
||||
final CoreDescriptor fixed = new CoreDescriptor(cc, "col_bad", "col_bad");
|
||||
cc.register("col_bad", cc.create(fixed), false);
|
||||
|
@ -324,7 +324,7 @@ public class CoreContainerCoreInitFailuresTest extends SolrTestCaseJ4 {
|
|||
|
||||
// ----
|
||||
// fix col_bad's config (again) and RELOAD to fix failure
|
||||
FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-basic.xml"),
|
||||
FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-defaults.xml"),
|
||||
FileUtils.getFile(solrHome, "col_bad", "conf", "solrconfig.xml"));
|
||||
cc.reload("col_bad");
|
||||
|
||||
|
|
|
@ -138,11 +138,26 @@ public class TestConfig extends SolrTestCaseJ4 {
|
|||
// If defaults change, add test methods to cover each version
|
||||
@Test
|
||||
public void testDefaults() throws Exception {
|
||||
|
||||
SolrConfig sc = new SolrConfig(new SolrResourceLoader("solr/collection1"), "solrconfig-defaults.xml", null);
|
||||
SolrIndexConfig sic = sc.indexConfig;
|
||||
assertEquals("default ramBufferSizeMB", 100.0D, sic.ramBufferSizeMB, 0.0D);
|
||||
assertEquals("default LockType", SolrIndexConfig.LOCK_TYPE_NATIVE, sic.lockType);
|
||||
assertEquals("default useCompoundFile", false, sic.useCompoundFile);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// sanity check that sys propertis are working as expected
|
||||
public void testSanityCheckTestSysPropsAreUsed() throws Exception {
|
||||
final boolean expectCFS
|
||||
= Boolean.parseBoolean(System.getProperty("useCompoundFile"));
|
||||
|
||||
SolrConfig sc = new SolrConfig(new SolrResourceLoader("solr/collection1"), "solrconfig-basic.xml", null);
|
||||
SolrIndexConfig sic = sc.indexConfig;
|
||||
assertTrue("default ramBufferSizeMB should be 100", sic.ramBufferSizeMB == 100);
|
||||
assertTrue("default useCompoundFile should be false", sic.useCompoundFile == false);
|
||||
assertTrue("default LockType should be native", sic.lockType.equals(SolrIndexConfig.LOCK_TYPE_NATIVE));
|
||||
assertEquals("default ramBufferSizeMB", 100.0D, sic.ramBufferSizeMB, 0.0D);
|
||||
assertEquals("default LockType", SolrIndexConfig.LOCK_TYPE_NATIVE, sic.lockType);
|
||||
assertEquals("useCompoundFile sysprop", expectCFS, sic.useCompoundFile);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -102,6 +102,7 @@ public class TestCoreDiscovery extends SolrTestCaseJ4 {
|
|||
assertTrue("Failed to mkdirs for " + confDir.getAbsolutePath(), confDir.mkdirs());
|
||||
FileUtils.copyFile(new File(top, "schema-tiny.xml"), new File(confDir, "schema-tiny.xml"));
|
||||
FileUtils.copyFile(new File(top, "solrconfig-minimal.xml"), new File(confDir, "solrconfig-minimal.xml"));
|
||||
FileUtils.copyFile(new File(top, "solrconfig.snippet.randomindexconfig.xml"), new File(confDir, "solrconfig.snippet.randomindexconfig.xml"));
|
||||
}
|
||||
|
||||
private CoreContainer init() throws Exception {
|
||||
|
|
|
@ -55,9 +55,12 @@ public class TestMergePolicyConfig extends SolrTestCaseJ4 {
|
|||
}
|
||||
|
||||
public void testLegacyMergePolicyConfig() throws Exception {
|
||||
final boolean expectCFS
|
||||
= Boolean.parseBoolean(System.getProperty("useCompoundFile"));
|
||||
|
||||
initCore("solrconfig-mergepolicy-legacy.xml","schema-minimal.xml");
|
||||
IndexWriterConfig iwc = solrConfig.indexConfig.toIndexWriterConfig(h.getCore().getLatestSchema());
|
||||
assertEquals(true, iwc.getUseCompoundFile());
|
||||
assertEquals(expectCFS, iwc.getUseCompoundFile());
|
||||
|
||||
|
||||
TieredMergePolicy tieredMP = assertAndCast(TieredMergePolicy.class,
|
||||
|
@ -65,16 +68,19 @@ public class TestMergePolicyConfig extends SolrTestCaseJ4 {
|
|||
|
||||
assertEquals(7, tieredMP.getMaxMergeAtOnce());
|
||||
assertEquals(7.0D, tieredMP.getSegmentsPerTier(), 0.0D);
|
||||
assertEquals(1.0D, tieredMP.getNoCFSRatio(), 0.0D);
|
||||
assertEquals(expectCFS ? 1.0D : 0.0D, tieredMP.getNoCFSRatio(), 0.0D);
|
||||
|
||||
assertCommitSomeNewDocs();
|
||||
assertCompoundSegments(h.getCore(), true);
|
||||
assertCompoundSegments(h.getCore(), expectCFS);
|
||||
}
|
||||
|
||||
public void testTieredMergePolicyConfig() throws Exception {
|
||||
final boolean expectCFS
|
||||
= Boolean.parseBoolean(System.getProperty("useCompoundFile"));
|
||||
|
||||
initCore("solrconfig-mergepolicy.xml","schema-minimal.xml");
|
||||
IndexWriterConfig iwc = solrConfig.indexConfig.toIndexWriterConfig(h.getCore().getLatestSchema());
|
||||
assertEquals(true, iwc.getUseCompoundFile());
|
||||
assertEquals(expectCFS, iwc.getUseCompoundFile());
|
||||
|
||||
|
||||
TieredMergePolicy tieredMP = assertAndCast(TieredMergePolicy.class,
|
||||
|
@ -94,11 +100,11 @@ public class TestMergePolicyConfig extends SolrTestCaseJ4 {
|
|||
// even though we have a single segment (which is 100% of the size of
|
||||
// the index which is higher then our 0.6D threashold) the
|
||||
// compound ratio doesn't matter because the segment was never merged
|
||||
assertCompoundSegments(h.getCore(), true);
|
||||
assertCompoundSegments(h.getCore(), expectCFS);
|
||||
|
||||
assertCommitSomeNewDocs();
|
||||
assertNumSegments(h.getCore(), 2);
|
||||
assertCompoundSegments(h.getCore(), true);
|
||||
assertCompoundSegments(h.getCore(), expectCFS);
|
||||
|
||||
assertU(optimize());
|
||||
assertNumSegments(h.getCore(), 1);
|
||||
|
|
|
@ -74,6 +74,7 @@ public class TestCollationField extends SolrTestCaseJ4 {
|
|||
|
||||
// copy over configuration files
|
||||
FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-basic.xml"), new File(confDir, "solrconfig.xml"));
|
||||
FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml"), new File(confDir, "solrconfig.snippet.randomindexconfig.xml"));
|
||||
FileUtils.copyFile(getFile("solr/collection1/conf/schema-collate.xml"), new File(confDir, "schema.xml"));
|
||||
|
||||
// generate custom collation rules (DIN 5007-2), saving to customrules.dat
|
||||
|
|
|
@ -55,6 +55,7 @@ public class TestManagedSchema extends AbstractBadConfigTestBase {
|
|||
FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig-mutable-managed-schema.xml"), tmpConfDir);
|
||||
FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig-managed-schema.xml"), tmpConfDir);
|
||||
FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig-basic.xml"), tmpConfDir);
|
||||
FileUtils.copyFileToDirectory(new File(testHomeConfDir, "solrconfig.snippet.randomindexconfig.xml"), tmpConfDir);
|
||||
FileUtils.copyFileToDirectory(new File(testHomeConfDir, "schema-one-field-no-dynamic-field.xml"), tmpConfDir);
|
||||
FileUtils.copyFileToDirectory(new File(testHomeConfDir, "schema-minimal.xml"), tmpConfDir);
|
||||
FileUtils.copyFileToDirectory(new File(testHomeConfDir, "schema_codec.xml"), tmpConfDir);
|
||||
|
|
|
@ -19,11 +19,12 @@
|
|||
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
<dataDir>${solr.data.dir:}</dataDir>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
<!-- <indexConfig> section could go here, but we want the defaults -->
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
</updateHandler>
|
||||
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
-->
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
<dataDir>${solr.data.dir:}</dataDir>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
|
||||
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
-->
|
||||
<config>
|
||||
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
|
||||
<indexConfig>
|
||||
<useCompoundFile>${useCompoundFile:false}</useCompoundFile>
|
||||
</indexConfig>
|
||||
<dataDir>${tempDir}/data/${l10n:}-${version:}</dataDir>
|
||||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
|
||||
|
||||
|
|
|
@ -86,6 +86,8 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
|||
@SuppressWarnings("unused")
|
||||
private static void beforeClass() {
|
||||
System.setProperty("jetty.testMode", "true");
|
||||
|
||||
System.setProperty("useCompoundFile", Boolean.toString(random().nextBoolean()));
|
||||
System.setProperty("enable.update.log", usually() ? "true" : "false");
|
||||
System.setProperty("tests.shardhandler.randomSeed", Long.toString(random().nextLong()));
|
||||
setupLogging();
|
||||
|
@ -106,6 +108,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
|||
System.clearProperty("jetty.testMode");
|
||||
System.clearProperty("tests.shardhandler.randomSeed");
|
||||
System.clearProperty("enable.update.log");
|
||||
System.clearProperty("useCompoundFile");
|
||||
}
|
||||
|
||||
private static boolean changedFactory = false;
|
||||
|
@ -1469,6 +1472,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
|||
String top = SolrTestCaseJ4.TEST_HOME() + "/collection1/conf";
|
||||
FileUtils.copyFile(new File(top, "schema-tiny.xml"), new File(subHome, "schema.xml"));
|
||||
FileUtils.copyFile(new File(top, "solrconfig-minimal.xml"), new File(subHome, "solrconfig.xml"));
|
||||
FileUtils.copyFile(new File(top, "solrconfig.snippet.randomindexconfig.xml"), new File(subHome, "solrconfig.snippet.randomindexconfig.xml"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue