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.
Note
This API is experimental and might change in incompatible ways in the next release.
Inheritance
System.Object
AutomatonQuery
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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
|
Improve this Doc
View Source
m_compiled
Declaration
protected readonly CompiledAutomaton m_compiled
Field Value
|
Improve this Doc
View Source
m_term
Term containing the field, and possibly some pattern structure
Declaration
protected readonly Term m_term
Field Value
Properties
|
Improve this Doc
View Source
Automaton
Returns the automaton used to create this query
Declaration
public virtual Automaton Automaton { get; }
Property Value
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
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
GetTermsEnum(Terms, AttributeSource)
Declaration
protected override TermsEnum GetTermsEnum(Terms terms, AttributeSource atts)
Parameters
Returns
Overrides
|
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