Class NumericRangeQueryNode
java.lang.Object
org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl
org.apache.lucene.queryparser.flexible.standard.nodes.AbstractRangeQueryNode<NumericQueryNode>
org.apache.lucene.queryparser.flexible.standard.nodes.NumericRangeQueryNode
- All Implemented Interfaces:
Cloneable,FieldableNode,QueryNode,RangeQueryNode<FieldValuePairQueryNode<?>>
This query node represents a range query composed by
NumericQueryNode
bounds, which means the bound values are Numbers.- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME -
Constructor Summary
ConstructorsConstructorDescriptionNumericRangeQueryNode(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig) Constructs aNumericRangeQueryNodeobject using the givenNumericQueryNodeas its bounds andNumericConfig. -
Method Summary
Modifier and TypeMethodDescriptionReturns theNumericConfigassociated with the lower and upper bounds.voidsetBounds(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig) Sets the upper and lower bounds of this range query node and theNumericConfigassociated with these bounds.toString()Every implementation of this class should return pseudo xml like this: For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>Methods inherited from class org.apache.lucene.queryparser.flexible.standard.nodes.AbstractRangeQueryNode
getField, getLowerBound, getUpperBound, isLowerInclusive, isUpperInclusive, setBounds, setField, toQueryStringMethods inherited from class org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl
add, add, clone, cloneTree, containsTag, getChildren, getParent, getTag, getTagMap, isLeaf, removeFromParent, set, setTag, unsetTagMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.queryparser.flexible.core.nodes.QueryNode
add, add, cloneTree, containsTag, getChildren, getParent, getTag, getTagMap, isLeaf, removeFromParent, set, setTag, unsetTag
-
Field Details
-
numericConfig
-
-
Constructor Details
-
NumericRangeQueryNode
public NumericRangeQueryNode(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig) throws QueryNodeException Constructs aNumericRangeQueryNodeobject using the givenNumericQueryNodeas its bounds andNumericConfig.- Parameters:
lower- the lower boundupper- the upper boundlowerInclusive-trueif the lower bound is inclusive, otherwise,falseupperInclusive-trueif the upper bound is inclusive, otherwise,falsenumericConfig- theNumericConfigthat represents associated with the upper and lower bounds- Throws:
QueryNodeException- See Also:
-
-
Method Details
-
setBounds
public void setBounds(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig) throws QueryNodeException Sets the upper and lower bounds of this range query node and theNumericConfigassociated with these bounds.- Parameters:
lower- the lower boundupper- the upper boundlowerInclusive-trueif the lower bound is inclusive, otherwise,falseupperInclusive-trueif the upper bound is inclusive, otherwise,falsenumericConfig- theNumericConfigthat represents associated with the upper and lower bounds- Throws:
QueryNodeException
-
getNumericConfig
Returns theNumericConfigassociated with the lower and upper bounds.- Returns:
- the
NumericConfigassociated with the lower and upper bounds
-
toString
Description copied from class:QueryNodeImplEvery implementation of this class should return pseudo xml like this: For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>- Specified by:
toStringin interfaceQueryNode- Overrides:
toStringin classAbstractRangeQueryNode<NumericQueryNode>- See Also:
-