Class Scorer

  • Direct Known Subclasses:
    ConstantScoreQuery.ConstantScorer, ScoreCachingWrappingScorer, SpanScorer

    public abstract class Scorer
    extends DocsEnum
    Expert: Common scoring functionality for different types of queries.

    A Scorer iterates over documents matching a query in increasing order of doc Id.

    Document scores are computed using a given Similarity implementation.

    NOTE: The values Float.Nan, Float.NEGATIVE_INFINITY and Float.POSITIVE_INFINITY are not valid scores. Certain collectors (eg TopScoreDocCollector) will not properly collect hits with these scores.

    • Field Detail

      • weight

        protected final Weight weight
        the Scorer's parent Weight. in some cases this may be null
    • Constructor Detail

      • Scorer

        protected Scorer​(Weight weight)
        Constructs a Scorer
        Parameters:
        weight - The scorers Weight.