Show / Hide Table of Contents

    Class QueryTermExtractor

    Utility class used to extract the terms used in a query, plus any weights. This class will not find terms for , RangeQuery and classes so the caller must pass a rewritten query (see ) to obtain a list of expanded terms.

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

    Methods

    | Improve this Doc View Source

    GetIdfWeightedTerms(Query, IndexReader, String)

    Extracts all terms texts of a given into an array of WeightedTerms

    Declaration
    public static WeightedTerm[] GetIdfWeightedTerms(Query query, IndexReader reader, string fieldName)
    Parameters
    Type Name Description
    Query query

    to extract term texts from

    IndexReader reader

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

    System.String fieldName

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

    Returns
    Type Description
    WeightedTerm[]

    an array of the terms used in a query, plus their weights.

    | Improve this Doc View Source

    GetTerms(Query)

    Extracts all terms texts of a given into an array of WeightedTerms

    Declaration
    public static WeightedTerm[] GetTerms(Query query)
    Parameters
    Type Name Description
    Query query

    to extract term texts from

    Returns
    Type Description
    WeightedTerm[]

    an array of the terms used in a query, plus their weights.

    | Improve this Doc View Source

    GetTerms(Query, Boolean)

    Extracts all terms texts of a given into an array of WeightedTerms

    Declaration
    public static WeightedTerm[] GetTerms(Query query, bool prohibited)
    Parameters
    Type Name Description
    Query query

    to extract term texts from

    System.Boolean prohibited

    true to extract "prohibited" terms, too

    Returns
    Type Description
    WeightedTerm[]

    an array of the terms used in a query, plus their weights.

    | Improve this Doc View Source

    GetTerms(Query, Boolean, String)

    Extracts all terms texts of a given into an array of WeightedTerms

    Declaration
    public static WeightedTerm[] GetTerms(Query query, bool prohibited, string fieldName)
    Parameters
    Type Name Description
    Query query

    to extract term texts from

    System.Boolean prohibited

    true to extract "prohibited" terms, too

    System.String fieldName

    The fieldName used to filter query terms

    Returns
    Type Description
    WeightedTerm[]

    an array of the terms used in a query, plus their weights.

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