Package org.apache.lucene.spatial.util
Class ShapeValuesPredicate
java.lang.Object
org.apache.lucene.spatial.util.ShapeValuesPredicate
- All Implemented Interfaces:
SegmentCacheable
Compares a shape from a provided
ShapeValuesSource with a given Shape and sees if it
matches a given SpatialOperation (the predicate).
Consumers should call iterator(LeafReaderContext, DocIdSetIterator) to obtain a
TwoPhaseIterator over a particular DocIdSetIterator. The initial DocIdSetIterator
will be used as the approximation, and the SpatialOperation comparison will only be
performed in TwoPhaseIterator.matches()
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
ConstructorsConstructorDescriptionShapeValuesPredicate(ShapeValuesSource shapeValuesource, SpatialOperation op, org.locationtech.spatial4j.shape.Shape queryShape) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleaniterator(LeafReaderContext ctx, DocIdSetIterator approximation) toString()
-
Constructor Details
-
ShapeValuesPredicate
public ShapeValuesPredicate(ShapeValuesSource shapeValuesource, SpatialOperation op, org.locationtech.spatial4j.shape.Shape queryShape) - Parameters:
shapeValuesource- Must yieldShapeinstances from its objectVal(doc). If null then the result is false. This is the left-hand (indexed) side.op- the predicatequeryShape- The shape on the right-hand (query) side.
-
-
Method Details
-
toString
-
iterator
public TwoPhaseIterator iterator(LeafReaderContext ctx, DocIdSetIterator approximation) throws IOException - Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
isCacheable
- Specified by:
isCacheablein interfaceSegmentCacheable
-