Class AbstractVisitingPrefixTreeQuery.VisitorTemplate

java.lang.Object
org.apache.lucene.spatial.prefix.AbstractPrefixTreeQuery.BaseTermsEnumTraverser
org.apache.lucene.spatial.prefix.AbstractVisitingPrefixTreeQuery.VisitorTemplate
Enclosing class:
AbstractVisitingPrefixTreeQuery

public abstract class AbstractVisitingPrefixTreeQuery.VisitorTemplate extends AbstractPrefixTreeQuery.BaseTermsEnumTraverser
An abstract class designed to make it easy to implement predicates or other operations on a SpatialPrefixTree indexed field. An instance of this class is not designed to be re-used across LeafReaderContext instances so simply create a new one per-leaf. The getDocIdSet() method here starts the work. It first checks that there are indexed terms; if not it quickly returns null. Then it calls start() so a subclass can set up a return value, like an FixedBitSet. Then it starts the traversal process, calling findSubCellsToVisit(org.apache.lucene.spatial.prefix.tree.Cell) which by default finds the top cells that intersect queryShape. If there isn't an indexed cell for a corresponding cell returned for this method then it's short-circuited until it finds one, at which point visitPrefix(org.apache.lucene.spatial.prefix.tree.Cell) is called. At some depths, of the tree, the algorithm switches to a scanning mode that calls visitScanned(org.apache.lucene.spatial.prefix.tree.Cell) for each leaf cell found.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.