public class BoostQueryNode extends QueryNodeImpl
BoostQueryNode boosts the QueryNode tree which is under this node.
So, it must only and always have one child.
The boost value may vary from 0.0 to 1.0.PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields| Constructor and Description |
|---|
BoostQueryNode(QueryNode query,
float value)
Constructs a boost node
|
| Modifier and Type | Method and Description |
|---|---|
QueryNode |
cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree
when you call the cloneTree() method
|
QueryNode |
getChild()
Returns the single child which this node boosts.
|
float |
getValue()
Returns the boost value.
|
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:
|
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTagpublic BoostQueryNode(QueryNode query, float value) throws QueryNodeException
query - the query to be boostedvalue - the boost value, it may vary from 0.0 to 1.0QueryNodeExceptionpublic QueryNode getChild()
public float getValue()
public String toString()
QueryNodeImpltoString in interface QueryNodetoString in class QueryNodeImplQueryNode.toString()public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
QueryNodepublic QueryNode cloneTree() throws CloneNotSupportedException
QueryNodecloneTree in interface QueryNodecloneTree in class QueryNodeImplCloneNotSupportedExceptionCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.