diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 7df88fc3705..084d0dd0d05 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -121,6 +121,8 @@ Optimizations * LUCENE-7994: Use int/int scatter map to gather facet counts when the number of hits is small relative to the number of unique facet labels (Dawid Weiss, Robert Muir, Mike McCandless) + +* LUCENE-8062: GlobalOrdinalsQuery is no longer eligible for caching. (Jim Ferenczi) Tests diff --git a/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsQuery.java b/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsQuery.java index 4b2d987addb..b1c0b91adfb 100644 --- a/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsQuery.java +++ b/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsQuery.java @@ -156,7 +156,10 @@ final class GlobalOrdinalsQuery extends Query { @Override public boolean isCacheable(LeafReaderContext ctx) { - return DocValues.isCacheable(ctx, joinField); + // disable caching because this query relies on a top reader context + // and holds a bitset of matching ordinals that cannot be accounted in + // the memory used by the cache + return false; } }