Package org.apache.lucene.spatial.prefix
Class ContainsPrefixTreeQuery
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.spatial.prefix.AbstractPrefixTreeQuery
org.apache.lucene.spatial.prefix.ContainsPrefixTreeQuery
Finds docs where its indexed shape
CONTAINS the query shape. For use on
RecursivePrefixTreeStrategy.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.spatial.prefix.AbstractPrefixTreeQuery
AbstractPrefixTreeQuery.BaseTermsEnumTraverser -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanIf the spatial data for a document is comprised of multiple overlapping or adjacent parts, it might fail to match a query shape when doing the CONTAINS predicate when the sum of those shapes contain the query shape but none do individually.Fields inherited from class org.apache.lucene.spatial.prefix.AbstractPrefixTreeQuery
detailLevel, fieldName, grid, queryShape -
Constructor Summary
ConstructorsConstructorDescriptionContainsPrefixTreeQuery(org.locationtech.spatial4j.shape.Shape queryShape, String fieldName, SpatialPrefixTree grid, int detailLevel, boolean multiOverlappingIndexedShapes) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected DocIdSetgetDocIdSet(LeafReaderContext context) inthashCode()Methods inherited from class org.apache.lucene.spatial.prefix.AbstractPrefixTreeQuery
createWeight, visitMethods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
-
Field Details
-
multiOverlappingIndexedShapes
protected final boolean multiOverlappingIndexedShapesIf the spatial data for a document is comprised of multiple overlapping or adjacent parts, it might fail to match a query shape when doing the CONTAINS predicate when the sum of those shapes contain the query shape but none do individually. Set this to false to increase performance if you don't care about that circumstance (such as if your indexed data doesn't even have such conditions). See LUCENE-5062.
-
-
Constructor Details
-
ContainsPrefixTreeQuery
public ContainsPrefixTreeQuery(org.locationtech.spatial4j.shape.Shape queryShape, String fieldName, SpatialPrefixTree grid, int detailLevel, boolean multiOverlappingIndexedShapes)
-
-
Method Details
-
equals
- Overrides:
equalsin classAbstractPrefixTreeQuery
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractPrefixTreeQuery
-
toString
-
getDocIdSet
- Specified by:
getDocIdSetin classAbstractPrefixTreeQuery- Throws:
IOException
-