Class RegexpQuery
A fast regular expression query based on the
Lucene.
- Comparisons are fast
- The term dictionary is enumerated in an intelligent way, to avoid
comparisons. See Automaton
Query for more details.
The supported syntax is documented in the Reg
Note this query can be slow, as it needs to iterate over many terms. In order
to prevent extremely slow Regexp.*
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public class RegexpQuery : AutomatonQuery
Constructors
| Improve this Doc View SourceRegexpQuery(Term)
Constructs a query for terms matching term
.
By default, all regular expression features are enabled.
Declaration
public RegexpQuery(Term term)
Parameters
Type | Name | Description |
---|---|---|
Term | term | Regular expression. |
RegexpQuery(Term, RegExpSyntax)
Constructs a query for terms matching term
.
Declaration
public RegexpQuery(Term term, RegExpSyntax flags)
Parameters
Type | Name | Description |
---|---|---|
Term | term | Regular expression. |
Reg |
flags | Optional Reg |
RegexpQuery(Term, RegExpSyntax, IAutomatonProvider)
Constructs a query for terms matching term
.
Declaration
public RegexpQuery(Term term, RegExpSyntax flags, IAutomatonProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Term | term | Regular expression. |
Reg |
flags | Optional Reg |
IAutomaton |
provider | Custom IAutomaton |
Methods
| Improve this Doc View SourceToString(String)
Prints a user-readable version of this query.
Declaration
public override string ToString(string field)
Parameters
Type | Name | Description |
---|---|---|
System. |
field |
Returns
Type | Description |
---|---|
System. |