public class NumericRangeQuery
extends Query
Modifier and Type | Class and Description |
---|---|
private class |
NumericRangeQuery.NumericRangeScorer |
private class |
NumericRangeQuery.NumericRangeWeight |
Modifier and Type | Field and Description |
---|---|
private String |
fieldName |
private boolean |
includeLower |
private boolean |
includeUpper |
private String |
lowerVal |
private String |
upperVal |
Constructor and Description |
---|
NumericRangeQuery(String fieldName,
String lowerVal,
String upperVal,
boolean includeLower,
boolean includeUpper) |
Modifier and Type | Method and Description |
---|---|
protected Weight |
createWeight(Searcher searcher) |
boolean |
equals(Object o)
Returns true if
o is equal to this. |
void |
extractTerms(Set terms) |
String |
getField()
Returns the field name for this query
|
String |
getLowerVal()
Returns the value of the lower endpoint of this range query, null if open ended
|
String |
getUpperVal()
Returns the value of the upper endpoint of this range query, null if open ended
|
int |
hashCode()
Returns a hash code value for this object.
|
boolean |
includesLower()
Returns
true if the lower endpoint is inclusive |
boolean |
includesUpper()
Returns
true if the upper endpoint is inclusive |
Query |
rewrite(IndexReader reader) |
String |
toString(String field)
Prints a user-readable version of this query.
|
private final String fieldName
private final boolean includeLower
private final String lowerVal
private final boolean includeUpper
private final String upperVal
public NumericRangeQuery(String fieldName, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)
public String getField()
public String getLowerVal()
public String getUpperVal()
public boolean includesLower()
true
if the lower endpoint is inclusivepublic boolean includesUpper()
true
if the upper endpoint is inclusivepublic Query rewrite(IndexReader reader) throws IOException
rewrite
in class Query
IOException
public void extractTerms(Set terms)
extractTerms
in class Query
protected Weight createWeight(Searcher searcher)
createWeight
in class Query
public String toString(String field)
toString
in class Query
public boolean equals(Object o)
o
is equal to this.equals
in class Object
public int hashCode()
hashCode
in class Object