Make boolean query clause limit configurable per-query [LUCENE-7880]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
As we know, the magic BooleanQuery.maxClauseCount has bitten many people over time.
It's also a static, which really hurts multi-tenancy (i.e. we can't have different settings for different users, clients, or use-cases).
If we want to keep this static as a default, then at least we should allow it to be overridden on a per-query basis when we know it is the desired behavior and not a bug.
Perhaps the simplest way to achieve this would be a setter on BooleanQuery.Builder that configures the limit for that instance only?
---
Migrated from [LUCENE-7880](https://issues.apache.org/jira/browse/LUCENE-7880) by Yonik Seeley (@yonik), updated Jun 20 2017
Linked issues:
- #5900
- [SOLR-10921](https://issues.apache.org/jira/browse/SOLR-10921)
- [SOLR-4586](https://issues.apache.org/jira/browse/SOLR-4586)
Contributor guide
Research direction
Start with BooleanQuery and BooleanQuery.Builder, then inspect the existing maxClauseCount behavior and the linked issues for constraints. Done means a per-query clause limit can override the static default without changing default behavior; the issue does not name a test, so identify the relevant BooleanQuery tests before running them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100