Show / Hide Table of Contents

    Class ScoreCachingWrappingScorer

    A Scorer which wraps another scorer and caches the score of the current document. Successive calls to GetScore() will return the same result and will not invoke the wrapped Scorer's GetScore() method, unless the current document has changed.

    This class might be useful due to the changes done to the ICollector interface, in which the score is not computed for a document by default, only if the collector requests it. Some collectors may need to use the score in several places, however all they have in hand is a Scorer object, and might end up computing the score of a document more than once.

    Inheritance
    System.Object
    DocIdSetIterator
    DocsEnum
    Scorer
    ScoreCachingWrappingScorer
    Inherited Members
    Scorer.m_weight
    Scorer.Weight
    DocsEnum.Attributes
    DocIdSetIterator.GetEmpty()
    DocIdSetIterator.NO_MORE_DOCS
    DocIdSetIterator.SlowAdvance(Int32)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public class ScoreCachingWrappingScorer : Scorer

    Constructors

    | Improve this Doc View Source

    ScoreCachingWrappingScorer(Scorer)

    Creates a new instance by wrapping the given scorer.

    Declaration
    public ScoreCachingWrappingScorer(Scorer scorer)
    Parameters
    Type Name Description
    Scorer scorer

    Properties

    | Improve this Doc View Source

    DocID

    Declaration
    public override int DocID { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    DocIdSetIterator.DocID
    | Improve this Doc View Source

    Freq

    Declaration
    public override int Freq { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    DocsEnum.Freq

    Methods

    | Improve this Doc View Source

    Advance(Int32)

    Declaration
    public override int Advance(int target)
    Parameters
    Type Name Description
    System.Int32 target
    Returns
    Type Description
    System.Int32
    Overrides
    DocIdSetIterator.Advance(Int32)
    | Improve this Doc View Source

    GetChildren()

    Declaration
    public override ICollection<Scorer.ChildScorer> GetChildren()
    Returns
    Type Description
    System.Collections.Generic.ICollection<Scorer.ChildScorer>
    Overrides
    Scorer.GetChildren()
    | Improve this Doc View Source

    GetCost()

    Declaration
    public override long GetCost()
    Returns
    Type Description
    System.Int64
    Overrides
    DocIdSetIterator.GetCost()
    | Improve this Doc View Source

    GetScore()

    Declaration
    public override float GetScore()
    Returns
    Type Description
    System.Single
    Overrides
    Scorer.GetScore()
    | Improve this Doc View Source

    NextDoc()

    Declaration
    public override int NextDoc()
    Returns
    Type Description
    System.Int32
    Overrides
    DocIdSetIterator.NextDoc()

    Extension Methods

    Number.IsNumber(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Licensed to the Apache Software Foundation (ASF)