Package org.apache.lucene.search
Interface SegmentCacheable
-
- All Known Implementing Classes:
ConstantScoreWeight
,DisjunctionMaxQuery.DisjunctionMaxWeight
,DoubleValuesSource
,FilterWeight
,LongValuesSource
,SpanContainingQuery.SpanContainingWeight
,org.apache.lucene.search.spans.SpanContainQuery.SpanContainWeight
,SpanNearQuery.SpanNearWeight
,SpanNotQuery.SpanNotWeight
,SpanOrQuery.SpanOrWeight
,SpanPositionCheckQuery.SpanPositionCheckWeight
,SpanTermQuery.SpanTermWeight
,SpanWeight
,SpanWithinQuery.SpanWithinWeight
,Weight
public interface SegmentCacheable
Interface defining whether or not an object can be cached against aLeafReader
Objects that depend only on segment-immutable structures such as Points or postings lists can just returntrue
fromisCacheable(LeafReaderContext)
Objects that depend on doc values should returnDocValues.isCacheable(LeafReaderContext, String...)
, which will check to see if the doc values fields have been updated. Updated doc values fields are not suitable for cacheing. Objects that are not segment-immutable, such as those that rely on global statistics or scores, should returnfalse
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isCacheable(LeafReaderContext ctx)
-
-
-
Method Detail
-
isCacheable
boolean isCacheable(LeafReaderContext ctx)
- Returns:
true
if the object can be cached against a given leaf
-
-