java.lang.Object
org.apache.lucene.search.HitsThresholdChecker
- Direct Known Subclasses:
HitsThresholdChecker.GlobalHitsThresholdChecker,HitsThresholdChecker.LocalHitsThresholdChecker
Used for defining custom algorithms to allow searches to early terminate
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classImplementation of HitsThresholdChecker which allows global hit countingprivate static classDefault implementation of HitsThresholdChecker to be used for single threaded execution -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final HitsThresholdCheckerNo-op implementation ofHitsThresholdCheckerthat does no counting, as the threshold can never be reached.private final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static HitsThresholdCheckercreate(int totalHitsThreshold) (package private) static HitsThresholdCheckercreateShared(int totalHitsThreshold) (package private) final int(package private) abstract void(package private) abstract boolean(package private) abstract ScoreMode
-
Field Details
-
EXACT_HITS_COUNT_THRESHOLD_CHECKER
No-op implementation ofHitsThresholdCheckerthat does no counting, as the threshold can never be reached. This is useful for cases where early termination is never desired, so that the overhead of counting hits can be avoided. -
totalHitsThreshold
private final int totalHitsThreshold
-
-
Constructor Details
-
HitsThresholdChecker
HitsThresholdChecker(int totalHitsThreshold)
-
-
Method Details
-
create
-
getHitsThreshold
final int getHitsThreshold() -
isThresholdReached
abstract boolean isThresholdReached() -
scoreMode
-
incrementHitCount
abstract void incrementHitCount()
-