abstract class RangeFieldQuery extends Query
RangeField types by a defined PointValues.Relation.| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
RangeFieldQuery.QueryType
Used by
RangeFieldQuery to check how each internal or leaf node relates to the query. |
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
bytesPerDim
number of bytes per dimension
|
(package private) java.lang.String |
field
field name
|
(package private) int |
numDims
number of dimensions - max 4
|
(package private) RangeFieldQuery.QueryType |
queryType
query relation
intersects:
CELL_CROSSES_QUERY,
contains: CELL_CONTAINS_QUERY,
within: CELL_WITHIN_QUERY |
(package private) byte[] |
ranges
ranges encoded as a sortable byte array
|
| Constructor and Description |
|---|
RangeFieldQuery(java.lang.String field,
byte[] ranges,
int numDims,
RangeFieldQuery.QueryType queryType)
Create a query for searching indexed ranges that match the provided relation.
|
| Modifier and Type | Method and Description |
|---|---|
private static void |
checkArgs(java.lang.String field,
byte[] ranges,
int numDims)
check input arguments
|
private void |
checkFieldInfo(FieldInfo fieldInfo)
Check indexed field info against the provided query data.
|
Weight |
createWeight(IndexSearcher searcher,
ScoreMode scoreMode,
float boost)
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(java.lang.Object o)
Override and implement query instance equivalence properly in a subclass.
|
protected boolean |
equalsTo(RangeFieldQuery other) |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
protected abstract java.lang.String |
toString(byte[] ranges,
int dimension)
Returns a string of a single value in a human-readable format for debugging.
|
java.lang.String |
toString(java.lang.String field)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
void |
visit(QueryVisitor visitor)
Recurse through the query tree, visiting any child queries
|
classHash, rewrite, sameClassAs, toStringfinal java.lang.String field
final RangeFieldQuery.QueryType queryType
CELL_CROSSES_QUERY,
contains: CELL_CONTAINS_QUERY,
within: CELL_WITHIN_QUERYfinal int numDims
final byte[] ranges
final int bytesPerDim
RangeFieldQuery(java.lang.String field,
byte[] ranges,
int numDims,
RangeFieldQuery.QueryType queryType)
field - field name. must not be null.ranges - encoded range values; this is done by the RangeField implementationqueryType - the query relationprivate static void checkArgs(java.lang.String field,
byte[] ranges,
int numDims)
private void checkFieldInfo(FieldInfo fieldInfo)
public void visit(QueryVisitor visitor)
Querypublic final Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws java.io.IOException
QueryOnly implemented by primitive queries, which re-write to themselves.
createWeight in class QueryscoreMode - How the produced scorers will be consumed.boost - The boost that is propagated by the parent queries.java.io.IOExceptionpublic int hashCode()
QueryQueryCache works properly.hashCode in class QueryQuery.equals(Object)public final boolean equals(java.lang.Object o)
QueryQueryCache works properly.
Typically a query will be equal to another only if it's an instance of
the same class and its document-filtering properties are identical that other
instance. Utility methods are provided for certain repetitive code.equals in class QueryQuery.sameClassAs(Object),
Query.classHash()protected boolean equalsTo(RangeFieldQuery other)
public java.lang.String toString(java.lang.String field)
Queryfield assumed to be the
default field and omitted.protected abstract java.lang.String toString(byte[] ranges,
int dimension)
Query.toString().dimension - dimension of the particular valueranges - encoded ranges, never null