public class FuzzyQueryNode extends FieldQueryNode
FuzzyQueryNode
represents a element that contains
field/text/similarity tuplebegin, end, field, positionIncrement, text
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor and Description |
---|
FuzzyQueryNode(CharSequence field,
CharSequence term,
float minSimilarity,
int begin,
int end) |
Modifier and Type | Method and Description |
---|---|
FuzzyQueryNode |
cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree
when you call the cloneTree() method
|
int |
getPrefixLength() |
float |
getSimilarity() |
void |
setPrefixLength(int prefixLength) |
void |
setSimilarity(float similarity) |
CharSequence |
toQueryString(EscapeQuerySyntax escaper)
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'/>
|
getBegin, getEnd, getField, getFieldAsString, getPositionIncrement, getTermEscaped, getTermEscapeQuoted, getText, getTextAsString, getValue, setBegin, setEnd, setField, setPositionIncrement, setText, setValue
add, add, allocate, clone, containsTag, getChildren, getParent, getTag, getTagMap, isDefaultField, isLeaf, isRoot, removeChildren, removeFromParent, set, setLeaf, setTag, unsetTag
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, add, containsTag, getChildren, getParent, getTag, getTagMap, isLeaf, removeChildren, removeFromParent, set, setTag, unsetTag
public FuzzyQueryNode(CharSequence field, CharSequence term, float minSimilarity, int begin, int end)
field
- - Field nameterm
- - ValueminSimilarity
- - similarity valuebegin
- - position in the query stringend
- - position in the query stringpublic void setPrefixLength(int prefixLength)
public int getPrefixLength()
public CharSequence toQueryString(EscapeQuerySyntax escaper)
QueryNode
toQueryString
in interface QueryNode
toQueryString
in class FieldQueryNode
public String toString()
QueryNodeImpl
toString
in interface QueryNode
toString
in class FieldQueryNode
QueryNode.toString()
public void setSimilarity(float similarity)
public FuzzyQueryNode cloneTree() throws CloneNotSupportedException
QueryNode
cloneTree
in interface QueryNode
cloneTree
in class FieldQueryNode
CloneNotSupportedException
public float getSimilarity()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.