C# Class Lucene.Net.Search.RegexpQuery

A fast regular expression query based on the Lucene.Net.Util.Automaton package.
  • Comparisons are fast
  • The term dictionary is enumerated in an intelligent way, to avoid comparisons. See AutomatonQuery for more details.

The supported syntax is documented in the RegExp class. Note this might be different than other regular expression implementations. For some alternatives with different syntax, look under the sandbox.

Note this query can be slow, as it needs to iterate over many terms. In order to prevent extremely slow RegexpQueries, a Regexp term should not start with the expression .*

Inheritance: AutomatonQuery
Afficher le fichier Open project: paulirwin/lucene.net Class Usage Examples

Méthodes publiques

Méthode Description
RegexpQuery ( Term term ) : System.Text

Constructs a query for terms matching term.

By default, all regular expression features are enabled.

RegexpQuery ( Term term, int flags ) : System.Text

Constructs a query for terms matching term.

RegexpQuery ( Term term, int flags, AutomatonProvider provider ) : System.Text

Constructs a query for terms matching term.

ToString ( string field ) : string

Prints a user-readable version of this query.

Method Details

RegexpQuery() public méthode

Constructs a query for terms matching term.

By default, all regular expression features are enabled.

public RegexpQuery ( Term term ) : System.Text
term Term regular expression.
Résultat System.Text

RegexpQuery() public méthode

Constructs a query for terms matching term.
public RegexpQuery ( Term term, int flags ) : System.Text
term Term regular expression.
flags int optional RegExp features from
Résultat System.Text

RegexpQuery() public méthode

Constructs a query for terms matching term.
public RegexpQuery ( Term term, int flags, AutomatonProvider provider ) : System.Text
term Term regular expression.
flags int optional RegExp features from
provider AutomatonProvider custom AutomatonProvider for named automata
Résultat System.Text

ToString() public méthode

Prints a user-readable version of this query.
public ToString ( string field ) : string
field string
Résultat string