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.Modifier and Type | Field and Description |
---|---|
private float |
value |
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.
|
private java.lang.CharSequence |
getValueString()
Returns the boost value parsed to a string.
|
java.lang.CharSequence |
toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
|
java.lang.String |
toString()
Every implementation of this class should return pseudo xml like this:
For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>
|
add, add, allocate, clone, containsTag, getChildren, getParent, getTag, getTagMap, isDefaultField, isLeaf, isRoot, removeChildren, removeFromParent, set, setLeaf, setTag, unsetTag
public BoostQueryNode(QueryNode query, float value)
query
- the query to be boostedvalue
- the boost value, it may vary from 0.0 to 1.0public QueryNode getChild()
public float getValue()
private java.lang.CharSequence getValueString()
public java.lang.String toString()
QueryNodeImpl
toString
in interface QueryNode
toString
in class QueryNodeImpl
QueryNode.toString()
public java.lang.CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
QueryNode
public QueryNode cloneTree() throws java.lang.CloneNotSupportedException
QueryNode
cloneTree
in interface QueryNode
cloneTree
in class QueryNodeImpl
java.lang.CloneNotSupportedException