public class NodeRegexpQuery extends NodeAutomatonQuery
NodePrimitiveQuery that provides a fast regular expression matching
based on the org.apache.lucene.util.automaton package.
NodeAutomatonQuery for more details.
The supported syntax is documented in the RegExp class.
Note this might be different than other regular expression implementations.
For some alternatives with different syntax, look under the sandbox.
Note this query can be slow, as it needs to iterate over many terms. In order
to prevent extremely slow RegexpQueries, a Regexp term should not start with
the expression .*
Code taken from RegexpQuery and adapted for SIREn.
MultiNodeTermQuery.RewriteMethodautomaton, 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 |
|---|
NodeRegexpQuery(org.apache.lucene.index.Term term)
Constructs a query for terms matching
term. |
NodeRegexpQuery(org.apache.lucene.index.Term term,
int flags)
Constructs a query for terms matching
term. |
NodeRegexpQuery(org.apache.lucene.index.Term term,
int flags,
org.apache.lucene.util.automaton.AutomatonProvider provider)
Constructs a query for terms matching
term. |
| Modifier and Type | Method and Description |
|---|---|
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 NodeRegexpQuery(org.apache.lucene.index.Term term)
term.
By default, all regular expression features are enabled.
term - regular expression.public NodeRegexpQuery(org.apache.lucene.index.Term term,
int flags)
term.term - regular expression.flags - optional RegExp features from RegExppublic NodeRegexpQuery(org.apache.lucene.index.Term term,
int flags,
org.apache.lucene.util.automaton.AutomatonProvider provider)
term.term - regular expression.flags - optional RegExp features from RegExpprovider - custom AutomatonProvider for named automatapublic String toString(String field)
toString in class NodeAutomatonQueryCopyright © 2014. All rights reserved.