org.apache.lucene.spatial.prefix
Class RecursivePrefixTreeStrategy
java.lang.Object
org.apache.lucene.spatial.SpatialStrategy
org.apache.lucene.spatial.prefix.PrefixTreeStrategy
org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy
public class RecursivePrefixTreeStrategy
- extends PrefixTreeStrategy
A 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.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
pointsOnly
protected boolean pointsOnly
- True if only indexed points shall be supported. See
IntersectsPrefixTreeFilter.hasIndexedLeaves
.
multiOverlappingIndexedShapes
protected boolean multiOverlappingIndexedShapes
- See
ContainsPrefixTreeFilter.multiOverlappingIndexedShapes
.
RecursivePrefixTreeStrategy
public RecursivePrefixTreeStrategy(SpatialPrefixTree grid,
String fieldName)
setPrefixGridScanLevel
public void setPrefixGridScanLevel(int prefixGridScanLevel)
- Sets the grid level [1-maxLevels] at which indexed terms are scanned brute-force
instead of by grid decomposition. By default this is maxLevels - 4. The
final level, maxLevels, is always scanned.
- Parameters:
prefixGridScanLevel
- 1 to maxLevels
toString
public String toString()
- Overrides:
toString
in class SpatialStrategy
makeFilter
public Filter makeFilter(SpatialArgs args)
- Description copied from class:
SpatialStrategy
- Make a Filter based principally on
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());
- Specified by:
makeFilter
in class SpatialStrategy
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.