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 class
Implementation of HitsThresholdChecker which allows global hit countingprivate static class
Default implementation of HitsThresholdChecker to be used for single threaded execution -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final HitsThresholdChecker
No-op implementation ofHitsThresholdChecker
that does no counting, as the threshold can never be reached.private final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static HitsThresholdChecker
create
(int totalHitsThreshold) (package private) static HitsThresholdChecker
createShared
(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 ofHitsThresholdChecker
that 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()
-