|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.queryParser.core.nodes.QueryNodeImpl
org.apache.lucene.queryParser.core.nodes.SlopQueryNode
public class SlopQueryNode
A SlopQueryNode represents phrase query with a slop.
From Lucene FAQ: Is there a way to use a proximity operator (like near or
within) with Lucene? There is a variable called slop that allows you to
perform NEAR/WITHIN-like queries. By default, slop is set to 0 so that only
exact phrases will match. When using TextParser you can use this syntax to
specify the slop: "doug cutting"~2 will find documents that contain
"doug cutting" as well as ones that contain "cutting doug".
| Field Summary |
|---|
| Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl |
|---|
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields |
| Constructor Summary | |
|---|---|
SlopQueryNode(QueryNode query,
int value)
|
|
| Method Summary | |
|---|---|
QueryNode |
cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method |
QueryNode |
getChild()
|
CharSequence |
getField()
Returns the field associated to the node and every node under it. |
int |
getValue()
|
void |
setField(CharSequence fieldName)
Associates the node to a field. |
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: |
| Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl |
|---|
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, 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.core.nodes.QueryNode |
|---|
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag |
| Constructor Detail |
|---|
public SlopQueryNode(QueryNode query,
int value)
query - - QueryNode Tree with the phrasevalue - - slop value| Method Detail |
|---|
public QueryNode getChild()
public int getValue()
public String toString()
QueryNodeImpl
toString in interface QueryNodetoString in class QueryNodeImplQueryNode.toString()public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
QueryNode
toQueryString in interface QueryNode
public QueryNode cloneTree()
throws CloneNotSupportedException
QueryNode
cloneTree in interface QueryNodecloneTree in class QueryNodeImplCloneNotSupportedExceptionpublic CharSequence getField()
FieldableNode
getField in interface FieldableNodepublic void setField(CharSequence fieldName)
FieldableNode
setField in interface FieldableNodefieldName - the field name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||