Package org.apache.lucene.spatial.prefix
Class TermQueryPrefixTreeStrategy
java.lang.Object
org.apache.lucene.spatial.SpatialStrategy
org.apache.lucene.spatial.prefix.PrefixTreeStrategy
org.apache.lucene.spatial.prefix.TermQueryPrefixTreeStrategy
A basic implementation of
PrefixTreeStrategy
using a large TermInSetQuery
of all
the cells from SpatialPrefixTree.getTreeCellIterator(org.locationtech.spatial4j.shape.Shape, int)
. It only
supports the search of indexed Point shapes.
The precision of query shapes (distErrPct) is an important factor in using this Strategy. If the precision is too precise then it will result in many terms which will amount to a slower query.
- 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.PrefixTreeStrategy
PrefixTreeStrategy.ShapeTokenStream
-
Field Summary
Fields inherited from class org.apache.lucene.spatial.prefix.PrefixTreeStrategy
defaultFieldValuesArrayLen, distErrPct, FIELD_TYPE, grid, pointsOnly
Fields inherited from class org.apache.lucene.spatial.SpatialStrategy
ctx
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.lucene.spatial.prefix.PrefixTreeStrategy
calcFacets, createCellIteratorToIndex, createIndexableFields, createIndexableFields, createIndexableFields, getDistErrPct, getGrid, isPointShape, isPointsOnly, makeDistanceValueSource, setDefaultFieldValuesArrayLen, setDistErrPct, setPointsOnly, tokenStream
Methods inherited from class org.apache.lucene.spatial.SpatialStrategy
getFieldName, getSpatialContext, makeDistanceValueSource, makeRecipDistanceValueSource, toString
-
Field Details
-
simplifyIndexedCells
protected boolean simplifyIndexedCells
-
-
Constructor Details
-
TermQueryPrefixTreeStrategy
-
-
Method Details
-
newCellToBytesRefIterator
- Overrides:
newCellToBytesRefIterator
in classPrefixTreeStrategy
-
makeQuery
Description copied from class:SpatialStrategy
Make a Query based principally onSpatialOperation
andShape
from the suppliedargs
. It should be constant scoring of 1.- Specified by:
makeQuery
in classSpatialStrategy
-