Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class TermQuery

    A Query that matches documents containing a term. this may be combined with other terms with a BooleanQuery.

    Inheritance
    System.Object
    Query
    TermQuery
    Inherited Members
    Query.Boost
    Query.ToString()
    Query.Rewrite(IndexReader)
    Query.Clone()
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    [Serializable]
    public class TermQuery : Query

    Constructors

    | Improve this Doc View Source

    TermQuery(Term)

    Constructs a query for the term t.

    Declaration
    public TermQuery(Term t)
    Parameters
    Type Name Description
    Term t
    | Improve this Doc View Source

    TermQuery(Term, TermContext)

    Expert: constructs a TermQuery that will use the provided docFreq instead of looking up the docFreq against the searcher.

    Declaration
    public TermQuery(Term t, TermContext states)
    Parameters
    Type Name Description
    Term t
    TermContext states
    | Improve this Doc View Source

    TermQuery(Term, Int32)

    Expert: constructs a TermQuery that will use the provided docFreq instead of looking up the docFreq against the searcher.

    Declaration
    public TermQuery(Term t, int docFreq)
    Parameters
    Type Name Description
    Term t
    System.Int32 docFreq

    Properties

    | Improve this Doc View Source

    Term

    Returns the term of this query.

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

    Methods

    | Improve this Doc View Source

    CreateWeight(IndexSearcher)

    Declaration
    public override Weight CreateWeight(IndexSearcher searcher)
    Parameters
    Type Name Description
    IndexSearcher searcher
    Returns
    Type Description
    Weight
    Overrides
    Query.CreateWeight(IndexSearcher)
    | Improve this Doc View Source

    Equals(Object)

    Returns true if o is equal to this.

    Declaration
    public override bool Equals(object o)
    Parameters
    Type Name Description
    System.Object o
    Returns
    Type Description
    System.Boolean
    Overrides
    Query.Equals(Object)
    | Improve this Doc View Source

    ExtractTerms(ISet<Term>)

    Declaration
    public override void ExtractTerms(ISet<Term> terms)
    Parameters
    Type Name Description
    System.Collections.Generic.ISet<Term> terms
    Overrides
    Query.ExtractTerms(ISet<Term>)
    | Improve this Doc View Source

    GetHashCode()

    Returns a hash code value for this object.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    Query.GetHashCode()
    | Improve this Doc View Source

    ToString(String)

    Prints a user-readable version of this query.

    Declaration
    public override string ToString(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    System.String
    Overrides
    Query.ToString(String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.