public class RegexpQueryNode extends QueryNodeImpl implements TextableQueryNode, FieldableNode
RegexpQueryNode represents RegexpQuery query Examples: /[a-z]|[0-9]/PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields| Constructor and Description |
|---|
RegexpQueryNode(java.lang.CharSequence field,
java.lang.CharSequence text,
int begin,
int end) |
| Modifier and Type | Method and Description |
|---|---|
RegexpQueryNode |
cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree
when you call the cloneTree() method
|
java.lang.CharSequence |
getField()
Returns the field associated to the node and every node under it.
|
java.lang.String |
getFieldAsString() |
java.lang.CharSequence |
getText() |
void |
setField(java.lang.CharSequence field)
Associates the node to a field.
|
void |
setText(java.lang.CharSequence text) |
BytesRef |
textToBytesRef() |
java.lang.CharSequence |
toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
|
java.lang.String |
toString()
Every implementation of this class should return pseudo xml like this:
For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>
|
add, add, allocate, clone, containsTag, getChildren, getParent, getTag, getTagMap, isDefaultField, isLeaf, isRoot, removeChildren, removeFromParent, set, setLeaf, setTag, unsetTagequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, add, containsTag, getChildren, getParent, getTag, getTagMap, isLeaf, removeChildren, removeFromParent, set, setTag, unsetTagpublic RegexpQueryNode(java.lang.CharSequence field,
java.lang.CharSequence text,
int begin,
int end)
field - - field nametext - - value that contains a regular expressionbegin - - position in the query stringend - - position in the query stringpublic BytesRef textToBytesRef()
public java.lang.String toString()
QueryNodeImpltoString in interface QueryNodetoString in class QueryNodeImplQueryNode.toString()public RegexpQueryNode cloneTree() throws java.lang.CloneNotSupportedException
QueryNodecloneTree in interface QueryNodecloneTree in class QueryNodeImpljava.lang.CloneNotSupportedExceptionpublic java.lang.CharSequence getText()
getText in interface TextableQueryNodepublic void setText(java.lang.CharSequence text)
setText in interface TextableQueryNodepublic java.lang.CharSequence getField()
FieldableNodegetField in interface FieldableNodepublic java.lang.String getFieldAsString()
public void setField(java.lang.CharSequence field)
FieldableNodesetField in interface FieldableNodefield - the field namepublic java.lang.CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
QueryNodetoQueryString in interface QueryNodeCopyright © 2000–2025 The Apache Software Foundation. All rights reserved.