Show / Hide Table of Contents

    Class WeightedSpanTermExtractor

    Class used to extract WeightedSpanTerms from a based on whether s from the are contained in a supplied .

    Inheritance
    System.Object
    WeightedSpanTermExtractor
    Namespace: Lucene.Net.Search.Highlight
    Assembly: Lucene.Net.Highlighter.dll
    Syntax
    public class WeightedSpanTermExtractor : object

    Constructors

    | Improve this Doc View Source

    WeightedSpanTermExtractor()

    Declaration
    public WeightedSpanTermExtractor()
    | Improve this Doc View Source

    WeightedSpanTermExtractor(String)

    Declaration
    public WeightedSpanTermExtractor(string defaultField)
    Parameters
    Type Name Description
    System.String defaultField

    Properties

    | Improve this Doc View Source

    ExpandMultiTermQuery

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

    IsCachedTokenStream

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

    TokenStream

    Declaration
    public virtual TokenStream TokenStream { get; }
    Property Value
    Type Description
    TokenStream

    Methods

    | Improve this Doc View Source

    CollectSpanQueryFields(SpanQuery, ISet<String>)

    Declaration
    protected virtual void CollectSpanQueryFields(SpanQuery spanQuery, ISet<string> fieldNames)
    Parameters
    Type Name Description
    SpanQuery spanQuery
    ISet<System.String> fieldNames
    | Improve this Doc View Source

    Extract(Query, IDictionary<String, WeightedSpanTerm>)

    Fills a with WeightedSpanTerms using the terms from the supplied query.

    Declaration
    protected virtual void Extract(Query query, IDictionary<string, WeightedSpanTerm> terms)
    Parameters
    Type Name Description
    Query query

    to extract Terms from

    IDictionary<System.String, WeightedSpanTerm> terms

    Map to place created WeightedSpanTerms in

    | Improve this Doc View Source

    ExtractUnknownQuery(Query, IDictionary<String, WeightedSpanTerm>)

    Declaration
    protected virtual void ExtractUnknownQuery(Query query, IDictionary<string, WeightedSpanTerm> terms)
    Parameters
    Type Name Description
    Query query
    IDictionary<System.String, WeightedSpanTerm> terms
    | Improve this Doc View Source

    ExtractWeightedSpanTerms(IDictionary<String, WeightedSpanTerm>, SpanQuery)

    Fills a with WeightedSpanTerms using the terms from the supplied .

    Declaration
    protected virtual void ExtractWeightedSpanTerms(IDictionary<string, WeightedSpanTerm> terms, SpanQuery spanQuery)
    Parameters
    Type Name Description
    IDictionary<System.String, WeightedSpanTerm> terms

    to place created WeightedSpanTerms in

    SpanQuery spanQuery

    to extract Terms from

    | Improve this Doc View Source

    ExtractWeightedTerms(IDictionary<String, WeightedSpanTerm>, Query)

    Fills a with WeightedSpanTerms using the terms from the supplied .

    Declaration
    protected virtual void ExtractWeightedTerms(IDictionary<string, WeightedSpanTerm> terms, Query query)
    Parameters
    Type Name Description
    IDictionary<System.String, WeightedSpanTerm> terms

    to place created WeightedSpanTerms in

    Query query

    to extract Terms from

    | Improve this Doc View Source

    FieldNameComparer(String)

    Necessary to implement matches for queries against Lucene.Net.Search.Highlight.WeightedSpanTermExtractor.defaultField

    Declaration
    protected virtual bool FieldNameComparer(string fieldNameToCheck)
    Parameters
    Type Name Description
    System.String fieldNameToCheck
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GetLeafContext()

    Declaration
    protected virtual AtomicReaderContext GetLeafContext()
    Returns
    Type Description
    AtomicReaderContext
    | Improve this Doc View Source

    GetWeightedSpanTerms(Query, TokenStream)

    Creates an from the given and .

    Declaration
    public virtual IDictionary<string, WeightedSpanTerm> GetWeightedSpanTerms(Query query, TokenStream tokenStream)
    Parameters
    Type Name Description
    Query query

    that caused hit

    TokenStream tokenStream

    of text to be highlighted

    Returns
    Type Description
    IDictionary<System.String, WeightedSpanTerm>

    Map containing WeightedSpanTerms

    | Improve this Doc View Source

    GetWeightedSpanTerms(Query, TokenStream, String)

    Creates an from the given and .

    Declaration
    public virtual IDictionary<string, WeightedSpanTerm> GetWeightedSpanTerms(Query query, TokenStream tokenStream, string fieldName)
    Parameters
    Type Name Description
    Query query

    that caused hit

    TokenStream tokenStream

    of text to be highlighted

    System.String fieldName

    restricts Term's used based on field name

    Returns
    Type Description
    IDictionary<System.String, WeightedSpanTerm>

    Map containing WeightedSpanTerms

    | Improve this Doc View Source

    GetWeightedSpanTermsWithScores(Query, TokenStream, String, IndexReader)

    Creates an from the given and . Uses a supplied to properly Weight terms (for gradient highlighting).

    Declaration
    public virtual IDictionary<string, WeightedSpanTerm> GetWeightedSpanTermsWithScores(Query query, TokenStream tokenStream, string fieldName, IndexReader reader)
    Parameters
    Type Name Description
    Query query

    that caused hit

    TokenStream tokenStream

    of text to be highlighted

    System.String fieldName

    restricts Term's used based on field name

    IndexReader reader

    to use for scoring

    Returns
    Type Description
    IDictionary<System.String, WeightedSpanTerm>

    Map of WeightedSpanTerms with quasi tf/idf scores

    | Improve this Doc View Source

    MustRewriteQuery(SpanQuery)

    Declaration
    protected virtual bool MustRewriteQuery(SpanQuery spanQuery)
    Parameters
    Type Name Description
    SpanQuery spanQuery
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    SetMaxDocCharsToAnalyze(Int32)

    Declaration
    protected 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 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
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)