public class NodeWildcardQuery extends NodeAutomatonQuery
NodePrimitiveQuery that implements the wildcard search query.
Supported wildcards are *, which
matches any character sequence (including the empty one), and ?,
which matches any single character. Note this query can be slow, as it
needs to iterate over many terms. In order to prevent extremely slow WildcardQueries,
a Wildcard term should not start with the wildcards *.
This query uses the MultiNodeTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT
rewrite method.
Code taken from WildcardQuery and adapted for SIREn.
AutomatonQueryMultiNodeTermQuery.RewriteMethod| Modifier and Type | Field and Description |
|---|---|
static char |
WILDCARD_CHAR
Char equality with support for wildcards
|
static char |
WILDCARD_ESCAPE
Escape character
|
static char |
WILDCARD_STRING
String equality with support for wildcards
|
automaton, compiled, termCONSTANT_SCORE_AUTO_REWRITE_DEFAULT, CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE, CONSTANT_SCORE_FILTER_REWRITE, field, rewriteMethod, SCORING_BOOLEAN_QUERY_REWRITEdatatypeancestor, levelConstraint, lowerBound, upperBound| Constructor and Description |
|---|
NodeWildcardQuery(org.apache.lucene.index.Term term) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.index.Term |
getTerm()
Returns the pattern term.
|
static org.apache.lucene.util.automaton.Automaton |
toAutomaton(org.apache.lucene.index.Term wildcardquery)
Convert wildcard syntax into an automaton.
|
String |
toString(String field)
Prints a user-readable version of this query.
|
equals, getTermsEnum, hashCodegetField, getRewriteMethod, getTermsEnum, rewrite, setRewriteMethodsetDatatype, wrapToStringWithDatatypegetDocsNodesAndPositionsEnum, getLevelConstraint, getNodeConstraint, setAncestorPointer, setLevelConstraint, setNodeConstraint, setNodeConstraintpublic static final char WILDCARD_STRING
public static final char WILDCARD_CHAR
public static final char WILDCARD_ESCAPE
public static org.apache.lucene.util.automaton.Automaton toAutomaton(org.apache.lucene.index.Term wildcardquery)
public org.apache.lucene.index.Term getTerm()
public String toString(String field)
toString in class NodeAutomatonQueryCopyright © 2014. All rights reserved.