public class TermQueryPrefixTreeStrategy extends PrefixTreeStrategy
PrefixTreeStrategy
using a large
TermsQuery
of all the cells from
SpatialPrefixTree.getTreeCellIterator(com.spatial4j.core.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.
Modifier and Type | Field and Description |
---|---|
protected boolean |
simplifyIndexedCells |
defaultFieldValuesArrayLen, distErrPct, FIELD_TYPE, grid, pointsOnly
ctx
Constructor and Description |
---|
TermQueryPrefixTreeStrategy(SpatialPrefixTree grid,
String fieldName) |
Modifier and Type | Method and Description |
---|---|
Filter |
makeFilter(SpatialArgs args)
|
protected CellToBytesRefIterator |
newCellToBytesRefIterator() |
calcFacets, createCellIteratorToIndex, createIndexableFields, createIndexableFields, createIndexableFields, getDistErrPct, getGrid, isPointsOnly, makeDistanceValueSource, setDefaultFieldValuesArrayLen, setDistErrPct, setPointsOnly
getFieldName, getSpatialContext, makeDistanceValueSource, makeQuery, makeRecipDistanceValueSource, toString
public TermQueryPrefixTreeStrategy(SpatialPrefixTree grid, String fieldName)
protected CellToBytesRefIterator newCellToBytesRefIterator()
newCellToBytesRefIterator
in class PrefixTreeStrategy
public Filter makeFilter(SpatialArgs args)
SpatialStrategy
SpatialOperation
and Shape
from the supplied args
.
If a subclasses implements
SpatialStrategy.makeQuery(org.apache.lucene.spatial.query.SpatialArgs)
then this method could be simply:
return new QueryWrapperFilter(makeQuery(args).getQuery());
makeFilter
in class SpatialStrategy
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.