On 1/5/2021 8:26 AM, dinesh naik wrote:
Hi all,
I want to update the maxBooleanClauses to 2048 (from default value 1024).
Below are the steps tried:
1. updated solrconfig.xml :
<maxBooleanClauses>${solr.max.booleanClauses:2048}</maxBooleanClauses>

You need to update EVERY solrconfig.xml that the JVM is loading for this to actually work.

maxBooleanClauses is an odd duck. At the Lucene level, where this matters, it is a global (JVM-wide) variable. So whenever Solr sets this value, it applies to ALL of the Lucene indexes that are being accessed by that JVM.

When you havet multiple Solr cores, the last core that was loaded will set the max clauses value for ALL cores. If any of your solrconfig.xml files don't have that config, then it will be set to the default of 1024 when that core is loaded or reloaded. Leaving the config out is not a solution.

So if any of your configs don't have the setting or set it to something lower than you need, you run the risk of having the max value incorrectly set across the board.

Here are the ways that I think this could be fixed:

1) Make the value per-index in Lucene, (or maybe even per-query) instead of global. 2) Have Solr only change the global Lucene value if the config is *higher* than the current global value. 3) Eliminate the limit entirely. Remove the config option from Solr and have Solr hard-set it to the maximum value.
4) Move the maxBooleanClauses config to solr.xml instead of solrconfig.xml

I think that option 1 is the best way to do it, but this problem has been around for many years, so it's probably not easy to do. I don't think it's going to happen. There are a number of existing issues in the Solr bug tracker for changing how the limit is configured.

2. updated  solr.xml :
<int name="maxBooleanClauses">${solr.max.booleanClauses:2048}</int>

I don't think it's currently possible to set the value with solr.xml.

Thanks,
Shawn

Reply via email to