C# Класс 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 .*

Наследование: AutomatonQuery
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

RegexpQuery() публичный Метод

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.
Результат System.Text

RegexpQuery() публичный Метод

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
Результат System.Text

RegexpQuery() публичный Метод

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
Результат System.Text

ToString() публичный Метод

Prints a user-readable version of this query.
public ToString ( string field ) : string
field string
Результат string