Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-4942: test improvements to randomize use of compound files

Chris M. Hostetterbe9bf006c25e
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 330fdafa9d4..c3465d2d44a 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -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
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml
index 2ae6c7f3a2b..73004d75ed2 100644
--- a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml
+++ b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml
@@ -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>
diff --git a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml
index 76cd7d4756c..04d591c8463 100644
--- a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml
+++ b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml
@@ -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
diff --git a/solr/contrib/dataimporthandler-extras/src/test-files/dihextras/solr/collection1/conf/dataimport-solrconfig.xml b/solr/contrib/dataimporthandler-extras/src/test-files/dihextras/solr/collection1/conf/dataimport-solrconfig.xml
index 1b263dd6ee2..d0e9844c9b0 100644
--- a/solr/contrib/dataimporthandler-extras/src/test-files/dihextras/solr/collection1/conf/dataimport-solrconfig.xml
+++ b/solr/contrib/dataimporthandler-extras/src/test-files/dihextras/solr/collection1/conf/dataimport-solrconfig.xml
@@ -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">
diff --git a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml
index 3a8b15dd208..4e8a96b117c 100644
--- a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml
+++ b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/contentstream-solrconfig.xml
@@ -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">
diff --git a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml
index 796f83185e1..9fa30736eb3 100644
--- a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml
+++ b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-nodatasource-solrconfig.xml
@@ -28,6 +28,7 @@
<indexConfig>
<lockType>single</lockType>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
</indexConfig>
<!-- the default high-performance update handler -->
diff --git a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml
index db0a57cc2f9..c7d208a8bd3 100644
--- a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml
+++ b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solrconfig.xml
@@ -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">
diff --git a/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml b/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
index 9700dcd93cb..1a7f2bb65c9 100644
--- a/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
+++ b/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
@@ -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
diff --git a/solr/contrib/langid/src/test-files/langid/solr/collection1/conf/solrconfig-languageidentifier.xml b/solr/contrib/langid/src/test-files/langid/solr/collection1/conf/solrconfig-languageidentifier.xml
index 6b2fdcd0b3c..c8d98fdc962 100644
--- a/solr/contrib/langid/src/test-files/langid/solr/collection1/conf/solrconfig-languageidentifier.xml
+++ b/solr/contrib/langid/src/test-files/langid/solr/collection1/conf/solrconfig-languageidentifier.xml
@@ -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
diff --git a/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/solrconfig.xml b/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/solrconfig.xml
index ebd7903b9d3..9a7143f2bd9 100644
--- a/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/solrconfig.xml
+++ b/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/solrconfig.xml
@@ -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
diff --git a/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml b/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml
index 76de1431156..c4ec6caa6f3 100644
--- a/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml
+++ b/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml
@@ -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
diff --git a/solr/contrib/velocity/src/test-files/velocity/solr/collection1/conf/solrconfig.xml b/solr/contrib/velocity/src/test-files/velocity/solr/collection1/conf/solrconfig.xml
index 8d77ee13015..0c702b13c72 100644
--- a/solr/contrib/velocity/src/test-files/velocity/solr/collection1/conf/solrconfig.xml
+++ b/solr/contrib/velocity/src/test-files/velocity/solr/collection1/conf/solrconfig.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml
index 7785b50e0d2..1fabd5c202f 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-SOLR-749.xml
@@ -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 -->
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml
index 96cfd2d1592..3105baf5157 100755
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-altdirectory.xml
@@ -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 >
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-basic.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-basic.xml
index b23c6125248..abfb42d88e1 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-basic.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-basic.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml
index c6f7cbfda64..0de6f9412f7 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml
@@ -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>
\ No newline at end of file
+</config>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-components-name.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-components-name.xml
index 40a945139f4..b5501d85508 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-components-name.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-components-name.xml
@@ -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. -->
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-defaults.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-defaults.xml
new file mode 100644
index 00000000000..fe39eef6a3e
--- /dev/null
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-defaults.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml
index 09e9c6533e2..80a11363b8f 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy1.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml
index 585a1cde2d6..6710892c6d5 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-delpolicy2.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
index 9d0732f3780..d218cb94ad9 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml
index d385f910800..2d563d6266a 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml
index 12bf3a24c10..1a1a4ffca62 100755
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-functionquery.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-highlight.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-highlight.xml
index 9da32455cd2..7d55cc2adef 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-highlight.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-highlight.xml
@@ -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. -->
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml
index 74c8268c6d6..3ee859af3dd 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-indexconfig.xml
@@ -22,6 +22,7 @@
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
<indexConfig>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
<maxIndexingThreads>123</maxIndexingThreads>
</indexConfig>
</config>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-lazywriter.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-lazywriter.xml
index 1e2939f6fb8..0636a1dcfac 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-lazywriter.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-lazywriter.xml
@@ -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"/>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml
index 13da8cfc669..383f858328a 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master.xml
index 7de4b30d3a6..996b87ab92a 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master.xml
@@ -24,6 +24,7 @@
<indexConfig>
<lockType>single</lockType>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
</indexConfig>
<updateHandler class="solr.DirectUpdateHandler2">
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1-keepOneBackup.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1-keepOneBackup.xml
index 5347975debc..313efc70d5d 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1-keepOneBackup.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1-keepOneBackup.xml
@@ -23,6 +23,7 @@
<indexConfig>
<lockType>single</lockType>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
</indexConfig>
<updateHandler class="solr.DirectUpdateHandler2">
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml
index 3ceaa73b816..b451b77a8e9 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master1.xml
@@ -24,6 +24,7 @@
<indexConfig>
<lockType>single</lockType>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
</indexConfig>
<updateHandler class="solr.DirectUpdateHandler2">
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml
index 02480160968..16d23826eb3 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master2.xml
@@ -24,6 +24,7 @@
<indexConfig>
<lockType>single</lockType>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
</indexConfig>
<updateHandler class="solr.DirectUpdateHandler2">
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml
index 3e486db34f1..9a1bafb63f0 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-master3.xml
@@ -24,6 +24,7 @@
<indexConfig>
<lockType>single</lockType>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
</indexConfig>
<updateHandler class="solr.DirectUpdateHandler2">
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml
index d25541e4743..00c77ae5e78 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy-legacy.xml
@@ -23,7 +23,7 @@
<indexConfig>
<mergeFactor>7</mergeFactor>
- <useCompoundFile>true</useCompoundFile>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
</indexConfig>
<requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml
index 207ffd027ed..cd37e605acd 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mergepolicy.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minimal.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minimal.xml
index 5fb39bb6f71..6bfd967c73d 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minimal.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minimal.xml
@@ -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">
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mutable-managed-schema.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mutable-managed-schema.xml
index 8daacbfdfc4..21571e11bb5 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-mutable-managed-schema.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-mutable-managed-schema.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-nativelock.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-nativelock.xml
index ac0f70dbbe4..7b5b6f7de93 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-nativelock.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-nativelock.xml
@@ -28,6 +28,7 @@
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
<indexConfig>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
<lockType>native</lockType>
</indexConfig>
</config>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-nocache.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-nocache.xml
index e89f7f9df97..ee27d0c49de 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-nocache.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-nocache.xml
@@ -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. -->
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml
index ca1d87d00d9..96b4f7b52f4 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml
index 8eb9b6bc4a8..c3d9d544e1f 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-postingshighlight.xml
@@ -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">
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject-indexdefault.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject-indexdefault.xml
index 7e862ea0ff3..a56a71e02c1 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject-indexdefault.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject-indexdefault.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject.xml
index 8669ea62f8b..0ba21a5fdc5 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-propinject.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml
index b123db969d3..af6cc75112d 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender-noquery.xml
@@ -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. -->
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender.xml
index a158d8d6867..12252c06b6f 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-querysender.xml
@@ -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. -->
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml
index f5c900e4210..fb79427d437 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-repeater.xml
@@ -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"/>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml
index cac524d7386..859883d52f0 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-response-log-component.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml
index bf0d93c0c4e..43fbc2873da 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-script-updateprocessor.xml
@@ -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" />
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-simplelock.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-simplelock.xml
index 17602671e62..7981b846850 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-simplelock.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-simplelock.xml
@@ -28,6 +28,7 @@
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
<indexConfig>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
<lockType>simple</lockType>
</indexConfig>
</config>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml
index b00206ffa88..1ff32ae1b17 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave.xml
@@ -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"/>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml
index 4eecf11789b..6e907a45f66 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-slave1.xml
@@ -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"/>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml
index db9968c2e94..722a3924e2b 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-solcoreproperties.xml
@@ -28,6 +28,7 @@
<indexConfig>
<lockType>single</lockType>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
</indexConfig>
<updateHandler class="solr.DirectUpdateHandler2">
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml
index 8a01c177933..9092a5875a8 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellcheckcomponent.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml
index 72fc0f61685..e6744cb3944 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-spellchecker.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml
index a5e497a3cf9..2afd813f29d 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-termindex.xml
@@ -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"/>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-managed-schema.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-managed-schema.xml
index 2da4f23c3a5..2ae9b356150 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-managed-schema.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-managed-schema.xml
@@ -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
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-mutable-managed-schema.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-mutable-managed-schema.xml
index 28c7c13a0f2..3c86eb9c49d 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-mutable-managed-schema.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-mutable-managed-schema.xml
@@ -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
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml
index dea28e61372..47ea0b6e469 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml
@@ -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
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-transformers.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-transformers.xml
index e59bad061f8..ecaaf1146d5 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-transformers.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-transformers.xml
@@ -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 -->
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml
index bff4d161886..7f526881e85 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-update-processor-chains.xml
@@ -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">
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-warmer.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-warmer.xml
index 3e1a46545be..69a0f8a990d 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-warmer.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-warmer.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml
index 4162e4fefb3..230a1ebf2f6 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-xinclude.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
new file mode 100644
index 00000000000..ce21fdf242b
--- /dev/null
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
index a95a0037620..991594cd415 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
@@ -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" />
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig_codec.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig_codec.xml
index 738bb335726..c5cc04cfe9d 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig_codec.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig_codec.xml
@@ -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"/>
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig_perf.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig_perf.xml
index 0c5e2054bc2..172fc953f37 100755
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig_perf.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig_perf.xml
@@ -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>
diff --git a/solr/core/src/test-files/solr/crazy-path-to-config.xml b/solr/core/src/test-files/solr/crazy-path-to-config.xml
index 43baf9d4b55..b4bd5e5e12e 100644
--- a/solr/core/src/test-files/solr/crazy-path-to-config.xml
+++ b/solr/core/src/test-files/solr/crazy-path-to-config.xml
@@ -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>
diff --git a/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java b/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java
index 60f8abf96fe..d713547490f 100644
--- a/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java
+++ b/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java
@@ -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"));
diff --git a/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java b/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java
index 1a5a55bdbdc..3b7ebf0b121 100644
--- a/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java
+++ b/solr/core/src/test/org/apache/solr/core/CoreContainerCoreInitFailuresTest.java
@@ -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");
diff --git a/solr/core/src/test/org/apache/solr/core/TestConfig.java b/solr/core/src/test/org/apache/solr/core/TestConfig.java
index 6debff63c04..1e2398ea8dc 100644
--- a/solr/core/src/test/org/apache/solr/core/TestConfig.java
+++ b/solr/core/src/test/org/apache/solr/core/TestConfig.java
@@ -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);
}
}
diff --git a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
index dd4973aefd6..6e9a67651d7 100644
--- a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
+++ b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
@@ -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 {
diff --git a/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java b/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java
index cb97443c9fe..b47eef5a474 100644
--- a/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java
+++ b/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java
@@ -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);
diff --git a/solr/core/src/test/org/apache/solr/schema/TestCollationField.java b/solr/core/src/test/org/apache/solr/schema/TestCollationField.java
index 09c6dd748b0..08ea28abec6 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestCollationField.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestCollationField.java
@@ -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
diff --git a/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java b/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java
index 7fb8a31dfe6..16fa650bba4 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestManagedSchema.java
@@ -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);
diff --git a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-slave1.xml b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-slave1.xml
index 76db378e42c..99bec049675 100644
--- a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-slave1.xml
+++ b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-slave1.xml
@@ -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>
diff --git a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml
index f1a31de6f40..7f683e501b9 100644
--- a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml
+++ b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml
@@ -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}"/>
diff --git a/solr/solrj/src/test-files/solrj/solr/shared/conf/solrconfig.xml b/solr/solrj/src/test-files/solrj/solr/shared/conf/solrconfig.xml
index 8cda0e68d0d..31d8f1d85a6 100644
--- a/solr/solrj/src/test-files/solrj/solr/shared/conf/solrconfig.xml
+++ b/solr/solrj/src/test-files/solrj/solr/shared/conf/solrconfig.xml
@@ -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}"/>
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
index eef9f8e7868..7b590046733 100755
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
@@ -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"));
}
}