apache / apache/lucene

Do not cache too large PointInSetQueries [LUCENE-10231]

Open
#11,267 0 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Minor module:core/search type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

TermInSetQuery will avoid caching queries using too much memory, but there is no such limit in PointInSetQuery and PointInSetQueryWithScore, which may have similar problems. I added the logic to these two queries, but I'm not sure whether this is the most reasonable way. May be this logic is common and we can judge this in LRUQueryCache ?

---
Migrated from [LUCENE-10231](https://issues.apache.org/jira/browse/LUCENE-10231) by Feng Guo (@gf2121), updated Nov 18 2021
Pull requests: https://github.com/apache/lucene/pull/436

Contributor guide

Open the contributing guide

Research direction

Compare the existing memory-limit logic in TermInSetQuery with PointInSetQuery and PointInSetQueryWithScore, then inspect LRUQueryCache as the possible common location. Determine how oversized queries should be excluded from caching and verify that both PointInSetQuery variants follow the chosen behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.