public class FuzzyQueryNode extends FieldQueryNode
FuzzyQueryNode represents a element that contains
field/text/similarity tuplebegin, end, field, positionIncrement, textPLAINTEXT_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, setValueadd, 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 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)
QueryNodetoQueryString in interface QueryNodetoQueryString in class FieldQueryNodepublic String toString()
QueryNodeImpltoString in interface QueryNodetoString in class FieldQueryNodeQueryNode.toString()public void setSimilarity(float similarity)
public FuzzyQueryNode cloneTree() throws CloneNotSupportedException
QueryNodecloneTree in interface QueryNodecloneTree in class FieldQueryNodeCloneNotSupportedExceptionpublic float getSimilarity()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.