LUCENE-9022: Never cache GlobalOrdinalsWithScoreQuery (#963)

This commit is contained in:
Jim Ferenczi 2019-10-22 15:14:36 +02:00 committed by GitHub
parent 597241a412
commit c68470e577
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -64,6 +64,8 @@ Other
* LUCENE-8768: Fix Javadocs build in Java 11. (Namgyu Kim)
* LUCENE-8062: GlobalOrdinalsWithScoreQuery is no longer eligible for query caching. (Jim Ferenczi)
======================= Lucene 8.4.0 =======================
API Changes

View File

@ -190,6 +190,13 @@ final class GlobalOrdinalsWithScoreQuery extends Query implements Accountable {
}
}
@Override
public boolean isCacheable(LeafReaderContext ctx) {
// 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;
}
}
final static class OrdinalMapScorer extends BaseGlobalOrdinalScorer {