public abstract class PointInSetQuery extends Query
IntPoint
,
is contained in the specified set.
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.newSetQuery()
for
fields indexed with IntPoint
.
PointValues
Modifier and Type | Class and Description |
---|---|
static class |
PointInSetQuery.Stream
Iterator of encoded point values.
|
Modifier | Constructor and Description |
---|---|
protected |
PointInSetQuery(String field,
int numDims,
int bytesPerDim,
PointInSetQuery.Stream packedPoints)
The
packedPoints iterator must be in sorted order. |
Modifier and Type | Method and Description |
---|---|
Weight |
createWeight(IndexSearcher searcher,
boolean needsScores)
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(Object other)
Override and implement query instance equivalence properly in a subclass.
|
int |
getBytesPerDim() |
String |
getField() |
int |
getNumDims() |
Collection<byte[]> |
getPackedPoints() |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
protected abstract String |
toString(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. |
classHash, rewrite, sameClassAs, toString
protected PointInSetQuery(String field, int numDims, int bytesPerDim, PointInSetQuery.Stream packedPoints)
packedPoints
iterator must be in sorted order.public final Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException
Query
Only implemented by primitive queries, which re-write to themselves.
createWeight
in class Query
needsScores
- True if document scores (Scorer.score()
) or match
frequencies (Scorer.freq()
) are needed.IOException
public Collection<byte[]> getPackedPoints()
public String getField()
public int getNumDims()
public int getBytesPerDim()
public final int hashCode()
Query
QueryCache
works properly.hashCode
in class Query
Query.equals(Object)
public final boolean equals(Object other)
Query
QueryCache
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 Query
Query.sameClassAs(Object)
,
Query.classHash()
public final String toString(String field)
Query
field
assumed to be the
default field and omitted.protected abstract String toString(byte[] value)
Query.toString()
.
The default implementation encodes the individual byte values.value
- single value, never nullCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.