|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl
org.apache.lucene.queryparser.flexible.standard.nodes.RegexpQueryNode
public class RegexpQueryNode
A RegexpQueryNode represents RegexpQuery query Examples: /[a-z]|[0-9]/
| Field Summary |
|---|
| Fields inherited from class org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl |
|---|
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields |
| Constructor Summary | |
|---|---|
RegexpQueryNode(CharSequence field,
CharSequence text,
int begin,
int end)
|
|
| Method Summary | |
|---|---|
RegexpQueryNode |
cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method |
CharSequence |
getField()
Returns the field associated to the node and every node under it. |
String |
getFieldAsString()
|
CharSequence |
getText()
|
void |
setField(CharSequence field)
Associates the node to a field. |
void |
setText(CharSequence text)
|
BytesRef |
textToBytesRef()
|
CharSequence |
toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser |
String |
toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/> |
| Methods inherited from class org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl |
|---|
add, add, allocate, clone, containsTag, getChildren, getParent, getTag, getTagMap, isDefaultField, isLeaf, isRoot, removeFromParent, set, setLeaf, setTag, unsetTag |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
|---|
add, add, containsTag, getChildren, getParent, getTag, getTagMap, isLeaf, removeFromParent, set, setTag, unsetTag |
| Constructor Detail |
|---|
public RegexpQueryNode(CharSequence field,
CharSequence text,
int begin,
int end)
field - - field nametext - - value that contains a regular expressionbegin - - position in the query stringend - - position in the query string| Method Detail |
|---|
public BytesRef textToBytesRef()
public String toString()
QueryNodeImpl
toString in interface QueryNodetoString in class QueryNodeImplQueryNode.toString()
public RegexpQueryNode cloneTree()
throws CloneNotSupportedException
QueryNode
cloneTree in interface QueryNodecloneTree in class QueryNodeImplCloneNotSupportedExceptionpublic CharSequence getText()
getText in interface TextableQueryNodepublic void setText(CharSequence text)
setText in interface TextableQueryNodepublic CharSequence getField()
FieldableNode
getField in interface FieldableNodepublic String getFieldAsString()
public void setField(CharSequence field)
FieldableNode
setField in interface FieldableNodefield - the field namepublic CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
QueryNode
toQueryString in interface QueryNode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||