public class RecursivePrefixTreeStrategy extends PrefixTreeStrategy
PrefixTreeStrategy
which uses RecursivePrefixTreeFilter
.
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.defaultFieldValuesArrayLen, distErrPct, FIELD_TYPE, grid
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, makeQuery, makeRecipDistanceValueSource
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-2012 Apache Software Foundation. All Rights Reserved.