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

Yonik Seeley commented on SOLR-4586:
------------------------------------

bq. Sure, just break it up into 1024-term chunks:

Right.  This will be slightly less efficient than one bigger boolean query, but 
it does work around the arbitrary limit.  The other workaround is to remove the 
arbitrary limit ;-)

For those that might not have the historical context: in the past, some 
auto-expanding term queries (like fuzzy queries) would generate more and more 
terms to search until "max clauses" was hit - so the limit had a purpose.  If 
you go back far enough, other queries (like prefix queries) generated unbounded 
boolean queries, and an exception would be thrown when too many terms were 
generated.  The latter was very bad (things worked in production until your 
index grew and then would blow up).  Solr luckily never had this issue as it 
used constant scoring techniques with no limits for both prefix and range 
queries from the beginning.

The historical reasons for this limit no longer apply.  No multi-term queries 
that solr uses explode into a huge boolean query if you remove the limit (this 
is what I'm busy verifying with tests right now).  This only affects explicitly 
created queries, where it's very bad to have an artificial limit like this set 
since it may work in testing and initially in production, and then blow up in 
the future because the arbitrary limit was crossed.


                
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to