public class RecursivePrefixTreeStrategy extends PrefixTreeStrategy
PrefixTreeStrategy
which uses AbstractVisitingPrefixTreeFilter
.
This strategy has support for searching non-point shapes (note: not tested).
Even a query shape with distErrPct=0 (fully precise to the grid) should have
good performance for typical data, unless there is a lot of indexed data
coincident with the shape's edge.Modifier and Type | Field and Description |
---|---|
protected boolean |
multiOverlappingIndexedShapes
|
protected boolean |
pointsOnly
True if only indexed points shall be supported.
|
defaultFieldValuesArrayLen, distErrPct, FIELD_TYPE, grid, simplifyIndexedCells
ctx
Constructor and Description |
---|
RecursivePrefixTreeStrategy(SpatialPrefixTree grid,
String fieldName) |
Modifier and Type | Method and Description |
---|---|
Filter |
makeFilter(SpatialArgs args)
|
void |
setPrefixGridScanLevel(int prefixGridScanLevel)
Sets the grid level [1-maxLevels] at which indexed terms are scanned brute-force
instead of by grid decomposition.
|
String |
toString() |
createIndexableFields, createIndexableFields, getDistErrPct, getGrid, makeDistanceValueSource, setDefaultFieldValuesArrayLen, setDistErrPct
getFieldName, getSpatialContext, makeDistanceValueSource, makeQuery, makeRecipDistanceValueSource
protected boolean pointsOnly
IntersectsPrefixTreeFilter.hasIndexedLeaves
.protected boolean multiOverlappingIndexedShapes
public RecursivePrefixTreeStrategy(SpatialPrefixTree grid, String fieldName)
public void setPrefixGridScanLevel(int prefixGridScanLevel)
prefixGridScanLevel
- 1 to maxLevelspublic String toString()
toString
in class SpatialStrategy
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-2014 Apache Software Foundation. All Rights Reserved.