Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-10921: set setMaxClauseCount for every SolrConfig creation to work around test framework issues

yonik78731ea8f4b7
diff --git a/solr/core/src/java/org/apache/solr/core/SolrConfig.java b/solr/core/src/java/org/apache/solr/core/SolrConfig.java
index bc946e8023d..dc7fe283743 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrConfig.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrConfig.java
@@ -375,6 +375,14 @@ public class SolrConfig extends Config implements MapSerializable {
classVsSolrPluginInfo = Collections.unmodifiableMap(map);
}
+ {
+ // non-static setMaxClauseCount because the test framework sometimes reverts the value on us and
+ // the static setting above is only executed once. This re-sets the value every time a SolrConfig
+ // obect is created. See SOLR-10921
+ BooleanQuery.setMaxClauseCount(Integer.MAX_VALUE-1);
+ }
+
+
public static class SolrPluginInfo {
public final Class clazz;