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:
java.lang.Cloneable
,FieldableNode
,QueryNode
,RangeQueryNode<FieldValuePairQueryNode<?>>
public class NumericRangeQueryNode extends AbstractRangeQueryNode<NumericQueryNode>
This query node represents a range query composed byNumericQueryNode
bounds, which means the bound values areNumber
s.- See Also:
NumericQueryNode
,AbstractRangeQueryNode
-
-
Field Summary
Fields Modifier and Type Field Description NumericConfig
numericConfig
-
Fields inherited from class org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME
-
-
Constructor Summary
Constructors Constructor Description NumericRangeQueryNode(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig)
Constructs aNumericRangeQueryNode
object using the givenNumericQueryNode
as its bounds andNumericConfig
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NumericConfig
getNumericConfig()
Returns theNumericConfig
associated with the lower and upper bounds.void
setBounds(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig)
Sets the upper and lower bounds of this range query node and theNumericConfig
associated with these bounds.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'/>-
Methods inherited from class org.apache.lucene.queryparser.flexible.standard.nodes.AbstractRangeQueryNode
getField, getLowerBound, getUpperBound, isLowerInclusive, isUpperInclusive, setBounds, setField, toQueryString
-
Methods inherited from class org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl
add, add, clone, cloneTree, containsTag, getChildren, getParent, getTag, getTagMap, isLeaf, removeFromParent, set, setTag, unsetTag
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods 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 Detail
-
numericConfig
public NumericConfig numericConfig
-
-
Constructor Detail
-
NumericRangeQueryNode
public NumericRangeQueryNode(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig) throws QueryNodeException
Constructs aNumericRangeQueryNode
object using the givenNumericQueryNode
as its bounds andNumericConfig
.- Parameters:
lower
- the lower boundupper
- the upper boundlowerInclusive
-true
if the lower bound is inclusive, otherwise,false
upperInclusive
-true
if the upper bound is inclusive, otherwise,false
numericConfig
- theNumericConfig
that represents associated with the upper and lower bounds- Throws:
QueryNodeException
- See Also:
setBounds(NumericQueryNode, NumericQueryNode, boolean, boolean, NumericConfig)
-
-
Method Detail
-
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 theNumericConfig
associated with these bounds.- Parameters:
lower
- the lower boundupper
- the upper boundlowerInclusive
-true
if the lower bound is inclusive, otherwise,false
upperInclusive
-true
if the upper bound is inclusive, otherwise,false
numericConfig
- theNumericConfig
that represents associated with the upper and lower bounds- Throws:
QueryNodeException
-
getNumericConfig
public NumericConfig getNumericConfig()
Returns theNumericConfig
associated with the lower and upper bounds.- Returns:
- the
NumericConfig
associated with the lower and upper bounds
-
toString
public java.lang.String toString()
Description copied from class:QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>- Specified by:
toString
in interfaceQueryNode
- Overrides:
toString
in classAbstractRangeQueryNode<NumericQueryNode>
- See Also:
QueryNode.toString()
-
-