Show / Hide Table of Contents

    Class QueryScorer

    IScorer implementation which scores text fragments by the number of unique query terms found. This class converts appropriate s to s and attempts to score only those terms that participated in generating the 'hit' on the document.

    Inheritance
    System.Object
    QueryScorer
    Implements
    IScorer
    Namespace: Lucene.Net.Search.Highlight
    Assembly: Lucene.Net.Highlighter.dll
    Syntax
    public class QueryScorer : object, IScorer

    Constructors

    | Improve this Doc View Source

    QueryScorer(WeightedSpanTerm[])

    Constructs a new QueryScorer instance

    Declaration
    public QueryScorer(WeightedSpanTerm[] weightedTerms)
    Parameters
    Type Name Description
    WeightedSpanTerm[] weightedTerms

    an array of pre-created WeightedSpanTerms

    | Improve this Doc View Source

    QueryScorer(Query)

    Constructs a new QueryScorer instance

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

    to use for highlighting

    | Improve this Doc View Source

    QueryScorer(Query, IndexReader, String)

    Constructs a new QueryScorer instance

    Declaration
    public QueryScorer(Query query, IndexReader reader, string field)
    Parameters
    Type Name Description
    Query query

    to use for highlighting

    IndexReader reader

    to use for quasi tf/idf scoring

    System.String field

    Field to highlight - pass null to ignore fields

    | Improve this Doc View Source

    QueryScorer(Query, IndexReader, String, String)

    Constructs a new QueryScorer instance

    Declaration
    public QueryScorer(Query query, IndexReader reader, string field, string defaultField)
    Parameters
    Type Name Description
    Query query

    to use for highlighting

    IndexReader reader

    to use for quasi tf/idf scoring

    System.String field

    Field to highlight - pass null to ignore fields

    System.String defaultField

    The default field for queries with the field name unspecified

    | Improve this Doc View Source

    QueryScorer(Query, String)

    Constructs a new QueryScorer instance

    Declaration
    public QueryScorer(Query query, string field)
    Parameters
    Type Name Description
    Query query

    to use for highlighting

    System.String field

    Field to highlight - pass null to ignore fields

    | Improve this Doc View Source

    QueryScorer(Query, String, String)

    Constructs a new QueryScorer instance

    Declaration
    public QueryScorer(Query query, string field, string defaultField)
    Parameters
    Type Name Description
    Query query

    to use for highlighting

    System.String field

    Field to highlight - pass null to ignore fields

    System.String defaultField

    The default field for queries with the field name unspecified

    Properties

    | Improve this Doc View Source

    ExpandMultiTermQuery

    Controls whether or not multi-term queries are expanded against a MemoryIndex . true if multi-term queries should be expanded

    Declaration
    public virtual bool ExpandMultiTermQuery { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    FragmentScore

    Declaration
    public virtual float FragmentScore { get; }
    Property Value
    Type Description
    System.Single
    See Also
    FragmentScore
    | 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

    GetTokenScore()

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

    GetWeightedSpanTerm(String)

    Retrieve the WeightedSpanTerm for the specified token. Useful for passing Span information to a IFragmenter.

    Declaration
    public virtual WeightedSpanTerm GetWeightedSpanTerm(string token)
    Parameters
    Type Name Description
    System.String token

    token to get WeightedSpanTerm for

    Returns
    Type Description
    WeightedSpanTerm

    WeightedSpanTerm for token

    | Improve this Doc View Source

    Init(TokenStream)

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

    NewTermExtractor(String)

    Declaration
    protected virtual WeightedSpanTermExtractor NewTermExtractor(string defaultField)
    Parameters
    Type Name Description
    System.String defaultField
    Returns
    Type Description
    WeightedSpanTermExtractor
    | Improve this Doc View Source

    SetMaxDocCharsToAnalyze(Int32)

    Declaration
    public virtual void SetMaxDocCharsToAnalyze(int maxDocCharsToAnalyze)
    Parameters
    Type Name Description
    System.Int32 maxDocCharsToAnalyze
    | Improve this Doc View Source

    SetWrapIfNotCachingTokenFilter(Boolean)

    By default, s that are not of the type are wrapped in a to ensure an efficient reset - if you are already using a different caching impl and you don't want it to be wrapped, set this to false.

    Declaration
    public virtual void SetWrapIfNotCachingTokenFilter(bool wrap)
    Parameters
    Type Name Description
    System.Boolean wrap
    | Improve this Doc View Source

    StartFragment(TextFragment)

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

    Implements

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