Class Boolean2ScorerSupplier

    • Field Detail

      • weight

        private final Weight weight
      • scoreMode

        private final ScoreMode scoreMode
      • minShouldMatch

        private final int minShouldMatch
      • cost

        private long cost
      • topLevelScoringClause

        private boolean topLevelScoringClause
    • Method Detail

      • computeCost

        private long computeCost()
      • setTopLevelScoringClause

        public void setTopLevelScoringClause()
                                      throws java.io.IOException
        Description copied from class: ScorerSupplier
        Inform this ScorerSupplier that its returned scorers produce scores that get passed to the collector, as opposed to partial scores that then need to get combined (e.g. summed up). Note that this method also gets called if scores are not requested, e.g. because the score mode is ScoreMode.COMPLETE_NO_SCORES, so implementations should look at both the score mode and this boolean to know whether to prepare for reacting to Scorable.setMinCompetitiveScore(float) calls.
        Overrides:
        setTopLevelScoringClause in class ScorerSupplier
        Throws:
        java.io.IOException
      • getInternal

        private Scorer getInternal​(long leadCost)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • req

        private Scorer req​(java.util.Collection<ScorerSupplier> requiredNoScoring,
                           java.util.Collection<ScorerSupplier> requiredScoring,
                           long leadCost,
                           boolean topLevelScoringClause)
                    throws java.io.IOException
        Create a new scorer for the given required clauses. Note that requiredScoring is a subset of required containing required clauses that should participate in scoring.
        Throws:
        java.io.IOException
      • excl

        private Scorer excl​(Scorer main,
                            java.util.Collection<ScorerSupplier> prohibited,
                            long leadCost)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • opt

        private Scorer opt​(java.util.Collection<ScorerSupplier> optional,
                           int minShouldMatch,
                           ScoreMode scoreMode,
                           long leadCost,
                           boolean topLevelScoringClause)
                    throws java.io.IOException
        Throws:
        java.io.IOException