Method GetRegexpQuery
GetRegexpQuery(String, String)
Factory method for generating a query. Called when parser parses an input term token that contains a regular expression query.
Depending on settings, pattern term may be lower-cased automatically. It will not go through the default Analyzer, however, since normal Analyzers are unlikely to work properly with regular expression templates.
Can be overridden by extending classes, to provide custom handling for regular expression queries, which may be necessary due to missing analyzer calls.
Declaration
protected virtual Query GetRegexpQuery(string field, string termStr)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | Name of the field query will use. |
System.String | termStr | Term token that contains a regular expression |
Returns
Type | Description |
---|---|
Query | Resulting Query built for the term |
Exceptions
Type | Condition |
---|---|
ParseException | throw in overridden method to disallow |