Show / Hide Table of Contents

    Class QueryTermScorer

    IScorer implementation which scores text fragments by the number of unique query terms found. This class uses the QueryTermExtractor class to process determine the query terms and their boosts to be used.

    Inheritance
    System.Object
    QueryTermScorer
    Implements
    IScorer
    Inherited Members
    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.Highlight
    Assembly: Lucene.Net.Highlighter.dll
    Syntax
    public class QueryTermScorer : IScorer

    Constructors

    | Improve this Doc View Source

    QueryTermScorer(WeightedTerm[])

    Declaration
    public QueryTermScorer(WeightedTerm[] weightedTerms)
    Parameters
    Type Name Description
    WeightedTerm[] weightedTerms
    | Improve this Doc View Source

    QueryTermScorer(Query)

    Declaration
    public QueryTermScorer(Query query)
    Parameters
    Type Name Description
    Query query

    a Lucene query (ideally rewritten using Rewrite(IndexReader) before being passed to this class and the searcher)

    | Improve this Doc View Source

    QueryTermScorer(Query, IndexReader, String)

    Declaration
    public QueryTermScorer(Query query, IndexReader reader, string fieldName)
    Parameters
    Type Name Description
    Query query

    a Lucene query (ideally rewritten using Rewrite(IndexReader) before being passed to this class and the searcher)

    IndexReader reader

    used to compute IDF which can be used to a) score selected fragments better b) use graded highlights eg set font color intensity

    System.String fieldName

    the field on which Inverse Document Frequency (IDF) calculations are based

    | Improve this Doc View Source

    QueryTermScorer(Query, String)

    Declaration
    public QueryTermScorer(Query query, string fieldName)
    Parameters
    Type Name Description
    Query query

    a Lucene query (ideally rewritten using Rewrite(IndexReader) before being passed to this class and the searcher)

    System.String fieldName

    the Field name which is used to match Query terms

    Properties

    | Improve this Doc View Source

    FragmentScore

    FragmentScore
    Declaration
    public virtual float FragmentScore { get; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    MaxTermWeight

    The highest weighted term (useful for passing to GradientFormatter to set top end of coloring scale.

    Declaration
    public virtual float MaxTermWeight { get; }
    Property Value
    Type Description
    System.Single

    Methods

    | Improve this Doc View Source

    AllFragmentsProcessed()

    Declaration
    public virtual void AllFragmentsProcessed()
    | Improve this Doc View Source

    GetTokenScore()

    GetTokenScore()
    Declaration
    public virtual float GetTokenScore()
    Returns
    Type Description
    System.Single
    | Improve this Doc View Source

    Init(TokenStream)

    Init(TokenStream)
    Declaration
    public virtual TokenStream Init(TokenStream tokenStream)
    Parameters
    Type Name Description
    TokenStream tokenStream
    Returns
    Type Description
    TokenStream
    | Improve this Doc View Source

    StartFragment(TextFragment)

    Declaration
    public virtual void StartFragment(TextFragment newFragment)
    Parameters
    Type Name Description
    TextFragment newFragment

    Implements

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