You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shawn Heisey (JIRA)" <ji...@apache.org> on 2013/04/05 00:38:16 UTC

[jira] [Commented] (SOLR-4586) Increase default maxBooleanClauses

    [ https://issues.apache.org/jira/browse/SOLR-4586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13622910#comment-13622910 ] 

Shawn Heisey commented on SOLR-4586:
------------------------------------

I have been working on a new patch.  Here's my current plan:

4x:
Support maxBooleanClauses in solrconfig.xml.  The highest value found wins.  If the first core loaded is missing the config option, the new CoreContainer.DEFAULT_MAX_BOOLEAN_CLAUSES constant (1048576) will be used, and is therefore likely to be that winner.  Robert's theoretical value of 5 is doable by putting it in the first core config, or in all of them.  The example solrconfig.xml for collection1 has some comments.  The maxBooleanClauses section is entirely removed from all other solrconfig.xml files in the source tree, which mostly means configs for tests.

{noformat}
    <!-- Max Boolean Clauses

         Maximum number of clauses in each BooleanQuery, an exception
         is thrown if a query exceeds this.

         ** WARNING **
         
         This option actually modifies a global Lucene property that
         will affect all SolrCores.  If multiple solrconfig.xml files
         disagree on this property, the highest value found will be
         the one that applies.  As of Solr 4.3, if the first solrconfig.xml
         file loaded does not have this specified, a default of 1048576
         will be used.  The default in older versions was 1024.

      -->
    <!--
    <maxBooleanClauses>1024</maxBooleanClauses>
     -->
{noformat}

trunk:
Set maxBooleanClauses to DEFAULT_MAX_BOOLEAN_CLAUSES constant in CoreContainer.  All other code for maxBooleanClauses is gone.  If someone needs more than 1048576 clauses, they'll have to modify the source.

I hope the 4x direction is correct.  The trunk change seems right to me, but I can make them the same if that would be better.  If any existing tests are affected, I will fix them.  I would like to build some tests specifically for this issue, but as I said before, I'll need help with that.

If trunk and 4x do end up being different, should they be entirely separate commits?  I have learned that standard practice is to commit to trunk, then merge the trunk commit into the release branch and do any necessary cleanup.

                
> Increase default maxBooleanClauses
> ----------------------------------
>
>                 Key: SOLR-4586
>                 URL: https://issues.apache.org/jira/browse/SOLR-4586
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 4.2
>         Environment: 4.3-SNAPSHOT 1456767M - ncindex - 2013-03-15 13:11:50
>            Reporter: Shawn Heisey
>         Attachments: SOLR-4586.patch, SOLR-4586.patch, SOLR-4586.patch, SOLR-4586.patch
>
>
> In the #solr IRC channel, I mentioned the maxBooleanClauses limitation to someone asking a question about queries.  Mark Miller told me that maxBooleanClauses no longer applies, that the limitation was removed from Lucene sometime in the 3.x series.  The config still shows up in the example even in the just-released 4.2.
> Checking through the source code, I found that the config option is parsed and the value stored in objects, but does not actually seem to be used by anything.  I removed every trace of it that I could find, and all tests still pass.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org