LUCENE-8062: GlobalOrdinalsQuery is no longer eligible for caching

This commit is contained in:
Jim Ferenczi 2017-11-28 14:56:28 +01:00
parent 207e546122
commit a06e685642
2 changed files with 6 additions and 1 deletions

View File

@ -122,6 +122,8 @@ Optimizations
number of hits is small relative to the number of unique facet labels number of hits is small relative to the number of unique facet labels
(Dawid Weiss, Robert Muir, Mike McCandless) (Dawid Weiss, Robert Muir, Mike McCandless)
* LUCENE-8062: GlobalOrdinalsQuery is no longer eligible for caching. (Jim Ferenczi)
Tests Tests
* LUCENE-8035: Run tests with JDK-specific options: --illegal-access=deny * LUCENE-8035: Run tests with JDK-specific options: --illegal-access=deny

View File

@ -156,7 +156,10 @@ final class GlobalOrdinalsQuery extends Query {
@Override @Override
public boolean isCacheable(LeafReaderContext ctx) { 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;
} }
} }