Class WildcardQuery
Implements the wildcard search query. Supported wildcards are *
, which
matches any character sequence (including the empty one), and ?
,
which matches any single character. '' is the escape character.
*
This query uses the
CONSTANT_SCORE_AUTO_REWRITE_DEFAULT
rewrite method.
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public class WildcardQuery : AutomatonQuery
Constructors
WildcardQuery(Term)
Constructs a query for terms matching term
.
Declaration
public WildcardQuery(Term term)
Parameters
Type | Name | Description |
---|---|---|
Term | term |
See Also
Fields
WILDCARD_CHAR
Char equality with support for wildcards
Declaration
public const char WILDCARD_CHAR = '?'
Field Value
Type | Description |
---|---|
char |
See Also
WILDCARD_ESCAPE
Escape character
Declaration
public const char WILDCARD_ESCAPE = '\\'
Field Value
Type | Description |
---|---|
char |
See Also
WILDCARD_STRING
String equality with support for wildcards
Declaration
public const char WILDCARD_STRING = '*'
Field Value
Type | Description |
---|---|
char |
See Also
Properties
Term
Returns the pattern term.
Declaration
public virtual Term Term { get; }
Property Value
Type | Description |
---|---|
Term |
See Also
Methods
ToAutomaton(Term)
Convert Lucene wildcard syntax into an automaton.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public static Automaton ToAutomaton(Term wildcardquery)
Parameters
Type | Name | Description |
---|---|---|
Term | wildcardquery |
Returns
Type | Description |
---|---|
Automaton |
See Also
ToString(string)
Prints a user-readable version of this query.
Declaration
public override string ToString(string field)
Parameters
Type | Name | Description |
---|---|---|
string | field |
Returns
Type | Description |
---|---|
string |