apache / apache/lucene

Don't use BooleanScorer for small segments [LUCENE-7365]

Open
#8,419 9 comments 0 reactions 1 assignee Claimed by @romseygeek View on GitHub
legacy-jira-priority:Major type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

If a BooleanQuery meets certain criteria (only contains disjunctions, is likely to match large numbers of docs) then we use a BooleanScorer to score groups of 1024 docs at a time. This allocates arrays of 1024 Bucket objects up-front. On very small segments (for example, a MemoryIndex) this is very wasteful of memory, particularly if the query is large or deeply-nested. We should avoid using a bulk scorer on these segments.

---
Migrated from [LUCENE-7365](https://issues.apache.org/jira/browse/LUCENE-7365) by Alan Woodward (@romseygeek), updated Jul 04 2016
Attachments: [LUCENE-7365.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7365/LUCENE-7365.patch) (versions: 3), [LUCENE-7365-query.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7365/LUCENE-7365-query.patch)
Linked issues:
- #8418

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.