apache / apache/lucene

Raise maxClauseCount in BooleanQuery to Integer.MAX_VALUE [LUCENE-4835]

Open
#5,900 14 comments 0 reactions 0 assignees View on GitHub
affects-version:4.2 legacy-jira-fix-version:4.9 legacy-jira-fix-version:6.0 legacy-jira-priority:Major type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Discussion on [SOLR-4586](https://issues.apache.org/jira/browse/SOLR-4586) raised the idea of raising the limit on boolean clauses from 1024 to Integer.MAX_VALUE. This should be a safe change. It will change the nature of help requests from "Why can't I do 2000 clauses?" to "Why is my 5000-clause query slow?"

---
Migrated from [LUCENE-4835](https://issues.apache.org/jira/browse/LUCENE-4835) by Shawn Heisey (@elyograg), 1 vote, updated Jun 17 2017
Linked issues:
- [SOLR-4586](https://issues.apache.org/jira/browse/SOLR-4586)
- #8931

Contributor guide

Open the contributing guide

Research direction

Locate the BooleanQuery implementation and its maxClauseCount setting, then read the surrounding clause-limit logic first. Review the linked SOLR-4586 and #8931 context to determine whether the requested change is still applicable; done means the clause limit matches the issue's request and existing behavior remains verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.