Show / Hide Table of Contents

    Class AutomatonQuery

    A Query that will match terms against a finite-state machine.

    This query will match documents that contain terms accepted by a given finite-state machine. The automaton can be constructed with the Lucene.Net.Util.Automaton API. Alternatively, it can be created from a regular expression with RegexpQuery or from the standard Lucene wildcard syntax with WildcardQuery.

    When the query is executed, it will create an equivalent DFA of the finite-state machine, and will enumerate the term dictionary in an intelligent way to reduce the number of comparisons. For example: the regular expression of [dl]og? will make approximately four comparisons: do, dog, lo, and log.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    Query
    MultiTermQuery
    AutomatonQuery
    RegexpQuery
    WildcardQuery
    Inherited Members
    MultiTermQuery.m_field
    MultiTermQuery.m_rewriteMethod
    MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE
    MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE
    MultiTermQuery.CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE
    MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT
    MultiTermQuery.Field
    MultiTermQuery.GetTermsEnum(Terms)
    MultiTermQuery.Rewrite(IndexReader)
    MultiTermQuery.MultiTermRewriteMethod
    Query.Boost
    Query.ToString()
    Query.CreateWeight(IndexSearcher)
    Query.ExtractTerms(ISet<Term>)
    Query.Clone()
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public class AutomatonQuery : MultiTermQuery

    Constructors

    | Improve this Doc View Source

    AutomatonQuery(Term, Automaton)

    Create a new AutomatonQuery from an Automaton.

    Declaration
    public AutomatonQuery(Term term, Automaton automaton)
    Parameters
    Type Name Description
    Term term

    Term containing field and possibly some pattern structure. The term text is ignored.

    Automaton automaton

    Automaton to run, terms that are accepted are considered a match.

    Fields

    | Improve this Doc View Source

    m_automaton

    The automaton to match index terms against

    Declaration
    protected readonly Automaton m_automaton
    Field Value
    Type Description
    Automaton
    | Improve this Doc View Source

    m_compiled

    Declaration
    protected readonly CompiledAutomaton m_compiled
    Field Value
    Type Description
    CompiledAutomaton
    | Improve this Doc View Source

    m_term

    Term containing the field, and possibly some pattern structure

    Declaration
    protected readonly Term m_term
    Field Value
    Type Description
    Term

    Properties

    | Improve this Doc View Source

    Automaton

    Returns the automaton used to create this query

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

    Methods

    | Improve this Doc View Source

    Equals(Object)

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

    GetHashCode()

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

    GetTermsEnum(Terms, AttributeSource)

    Declaration
    protected override TermsEnum GetTermsEnum(Terms terms, AttributeSource atts)
    Parameters
    Type Name Description
    Terms terms
    AttributeSource atts
    Returns
    Type Description
    TermsEnum
    Overrides
    MultiTermQuery.GetTermsEnum(Terms, AttributeSource)
    | Improve this Doc View Source

    ToString(String)

    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 © 2020 Licensed to the Apache Software Foundation (ASF)