Class CompletionScorer


  • public class CompletionScorer
    extends BulkScorer
    Expert: Responsible for executing the query against an appropriate suggester and collecting the results via a collector.

    score(LeafCollector, Bits, int, int) is called for each leaf reader.

    accept(int,Bits) and score(float, float) is called for every matched completion (i.e. document)

    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Field Detail

      • weight

        protected final CompletionWeight weight
        weight that created this scorer
    • Method Detail

      • accept

        public final boolean accept​(int docID,
                                    Bits liveDocs)
        Returns true if a document with docID is accepted, false if the docID maps to a deleted document or has been filtered out
        Parameters:
        liveDocs - the Bits representing live docs, or possibly null if all docs are live
      • score

        public float score​(float weight,
                           float boost)
        Returns the score for a matched completion based on the query time boost and the index time weight.