Package org.apache.lucene.spatial.prefix

# Class AbstractVisitingPrefixTreeQuery

java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.spatial.prefix.AbstractPrefixTreeQuery
org.apache.lucene.spatial.prefix.AbstractVisitingPrefixTreeQuery

Direct Known Subclasses:
  `IntersectsPrefixTreeQuery`, `WithinPrefixTreeQuery`

public abstract class AbstractVisitingPrefixTreeQuery extends AbstractPrefixTreeQuery
Traverses a `SpatialPrefixTree` indexed field, using the template and visitor design patterns for subclasses to guide the traversal and collect matching documents.

Subclasses implement `AbstractPrefixTreeQuery.getDocIdSet(org.apache.lucene.index.LeafReaderContext)` by instantiating a custom `AbstractVisitingPrefixTreeQuery.VisitorTemplate` subclass (i.e. an anonymous inner class) and implement the required methods.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `class`
  `AbstractVisitingPrefixTreeQuery.VisitorTemplate`
  An abstract class designed to make it easy to implement predicates or other operations on a `SpatialPrefixTree` indexed field.
  `protected static class`
  `AbstractVisitingPrefixTreeQuery.VNode`
  A visitor node/cell found via the query shape for `AbstractVisitingPrefixTreeQuery.VisitorTemplate`.

  ## Nested classes/interfaces inherited from class org.apache.lucene.spatial.prefix.AbstractPrefixTreeQuery

  `AbstractPrefixTreeQuery.BaseTermsEnumTraverser`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final int`
  `prefixGridScanLevel`

  ### Fields inherited from class org.apache.lucene.spatial.prefix.AbstractPrefixTreeQuery

  `detailLevel, fieldName, grid, queryShape`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractVisitingPrefixTreeQuery(org.locationtech.spatial4j.shape.Shape queryShape, String fieldName, SpatialPrefixTree grid, int detailLevel, int prefixGridScanLevel)`

- ## Method Summary

  ### Methods inherited from class org.apache.lucene.spatial.prefix.AbstractPrefixTreeQuery

  `createWeight, equals, getDocIdSet, hashCode, visit`

  ### Methods inherited from class org.apache.lucene.search.Query

  `classHash, rewrite, sameClassAs, toString, toString`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### prefixGridScanLevel

    protected final int prefixGridScanLevel

- ## Constructor Details

  - ### AbstractVisitingPrefixTreeQuery

    public AbstractVisitingPrefixTreeQuery(org.locationtech.spatial4j.shape.Shape queryShape, String fieldName, SpatialPrefixTree grid, int detailLevel, int prefixGridScanLevel)