mirror of https://github.com/apache/lucene.git
LUCENE-8078: The query cache should not cache instances of MatchNoDocsQuery
This commit is contained in:
parent
faa77e92dd
commit
bdaf1baa80
|
@ -127,6 +127,9 @@ Bug Fixes
|
|||
* LUCENE-8034: Use subtraction instead of addition to sidestep int
|
||||
overflow in SpanNotQuery. (Hari Menon via Mike McCandless)
|
||||
|
||||
* LUCENE-8078: The query cache should not cache instances of
|
||||
MatchNoDocsQuery. (Jon Harper via Adrien Grand)
|
||||
|
||||
Optimizations
|
||||
|
||||
* LUCENE-8018: Smaller FieldInfos memory footprint by not retaining unnecessary
|
||||
|
|
|
@ -68,7 +68,7 @@ public class UsageTrackingQueryCachingPolicy implements QueryCachingPolicy {
|
|||
// For the below queries, it's cheap to notice they cannot match any docs so
|
||||
// we do not bother caching them.
|
||||
if (query instanceof MatchNoDocsQuery) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (query instanceof BooleanQuery) {
|
||||
|
|
Loading…
Reference in New Issue