C# Class Lucene.Net.Search.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.

@lucene.experimental
Inheritance: MultiTermQuery
ファイルを表示 Open project: paulirwin/lucene.net Class Usage Examples

Protected Properties

Property Type Description
Automaton_Renamed Automaton
Compiled CompiledAutomaton
Term Term

Public Methods

Method Description
AutomatonQuery ( Term term, Automaton automaton ) : System.Text

Create a new AutomatonQuery from an Automaton.

Equals ( object obj ) : bool
GetHashCode ( ) : int
GetTermsEnum ( Terms terms, AttributeSource atts ) : TermsEnum
ToString ( string field ) : string

Method Details

AutomatonQuery() public method

Create a new AutomatonQuery from an Automaton.
public AutomatonQuery ( Term term, Automaton automaton ) : System.Text
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.
return System.Text

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetTermsEnum() public method

public GetTermsEnum ( Terms terms, AttributeSource atts ) : TermsEnum
terms Terms
atts AttributeSource
return TermsEnum

ToString() public method

public ToString ( string field ) : string
field string
return string

Property Details

Automaton_Renamed protected_oe property

the automaton to match index terms against
protected Automaton Automaton_Renamed
return Automaton

Compiled protected_oe property

protected CompiledAutomaton Compiled
return CompiledAutomaton

Term protected_oe property

term containing the field, and possibly some pattern structure
protected Term Term
return Term