|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectQuery
NumericRangeQuery
public class NumericRangeQuery
A query that implements efficient range searching on numeric data. Handles positive numbers up to 63 bits.
Nested Class Summary | |
---|---|
private class |
NumericRangeQuery.NumericRangeScorer
|
private class |
NumericRangeQuery.NumericRangeWeight
|
Field Summary | |
---|---|
private String |
fieldName
|
private boolean |
includeLower
|
private boolean |
includeUpper
|
private String |
lowerVal
|
private String |
upperVal
|
Constructor Summary | |
---|---|
NumericRangeQuery(String fieldName,
String lowerVal,
String upperVal,
boolean includeLower,
boolean includeUpper)
|
Method Summary | |
---|---|
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. |
Methods inherited from class Query |
---|
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight |
Methods inherited from class Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final String fieldName
private final boolean includeLower
private final String lowerVal
private final boolean includeUpper
private final String upperVal
Constructor Detail |
---|
public NumericRangeQuery(String fieldName, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)
Method Detail |
---|
public String getField()
public String getLowerVal()
public String getUpperVal()
public boolean includesLower()
true
if the lower endpoint is inclusive
public boolean includesUpper()
true
if the upper endpoint is inclusive
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |