Factory method for generating a query. Called when parser parses an input term token that contains one or more wildcard characters (? and *), but is not a prefix term token (one that has just a single * character at the end)

Depending on settings, prefix term may be lower-cased automatically. It will not go through the default Analyzer, however, since normal Analyzers are unlikely to work properly with wildcard templates.

Can be overridden by extending classes, to provide custom handling for wildcard queries, which may be necessary due to missing analyzer calls.

Namespace: Lucene.Net.QueryParsers
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public virtual Query GetWildcardQuery(
	string field,
	string termStr
)
Visual Basic
Public Overridable Function GetWildcardQuery ( _
	field As String, _
	termStr As String _
) As Query
Visual C++
public:
virtual Query^ GetWildcardQuery(
	String^ field, 
	String^ termStr
)

Parameters

field
Type: System..::..String
Name of the field query will use.
termStr
Type: System..::..String
Term token that contains one or more wild card characters (? or *), but is not simple prefix term

Return Value

Resulting {@link Query} built for the term

Exceptions

ExceptionCondition
Lucene.Net.QueryParsers..::..ParseExceptionthrow in overridden method to disallow

See Also