public abstract class PointRangeQuery extends Query
IntPoint.
This is for subclasses and works on the underlying binary encoding: to
create range queries for lucene's standard Point types, refer to factory
methods on those classes, e.g. IntPoint.newRangeQuery() for
fields indexed with IntPoint.
For a single-dimensional field this query is a simple range query; in a multi-dimensional field it's a box shape.
PointValues| Modifier | Constructor and Description |
|---|---|
protected |
PointRangeQuery(String field,
byte[] lowerPoint,
byte[] upperPoint,
int numDims)
Expert: create a multidimensional range query for point values.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
checkArgs(String field,
Object lowerPoint,
Object upperPoint)
Check preconditions for all factory methods
|
Weight |
createWeight(IndexSearcher searcher,
boolean needsScores)
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(Object other) |
int |
hashCode() |
protected abstract String |
toString(int dimension,
byte[] value)
Returns a string of a single value in a human-readable format for debugging.
|
String |
toString(String field)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
protected PointRangeQuery(String field, byte[] lowerPoint, byte[] upperPoint, int numDims)
field - field name. must not be null.lowerPoint - lower portion of the range (inclusive).upperPoint - upper portion of the range (inclusive).numDims - number of dimensions.IllegalArgumentException - if field is null, or if lowerValue.length != upperValue.lengthpublic static void checkArgs(String field, Object lowerPoint, Object upperPoint)
IllegalArgumentException - if field, lowerPoint or upperPoint are null.public final Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException
QueryOnly implemented by primitive queries, which re-write to themselves.
createWeight in class QueryneedsScores - True if document scores (Scorer.score()) or match
frequencies (Scorer.freq()) are needed.IOExceptionpublic final String toString(String field)
Queryfield assumed to be the
default field and omitted.protected abstract String toString(int dimension, byte[] value)
Query.toString().dimension - dimension of the particular valuevalue - single value, never nullCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.