Class HitsThresholdChecker

java.lang.Object
org.apache.lucene.search.HitsThresholdChecker
Direct Known Subclasses:
HitsThresholdChecker.GlobalHitsThresholdChecker, HitsThresholdChecker.LocalHitsThresholdChecker

abstract class HitsThresholdChecker extends Object
Used for defining custom algorithms to allow searches to early terminate
  • Field Details

    • EXACT_HITS_COUNT_THRESHOLD_CHECKER

      private static final HitsThresholdChecker EXACT_HITS_COUNT_THRESHOLD_CHECKER
      No-op implementation of HitsThresholdChecker 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

      static HitsThresholdChecker create(int totalHitsThreshold)
    • createShared

      static HitsThresholdChecker createShared(int totalHitsThreshold)
    • getHitsThreshold

      final int getHitsThreshold()
    • isThresholdReached

      abstract boolean isThresholdReached()
    • scoreMode

      abstract ScoreMode scoreMode()
    • incrementHitCount

      abstract void incrementHitCount()