Package org.apache.lucene.spatial.prefix

# Class AbstractPrefixTreeQuery

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

Direct Known Subclasses:
  `AbstractVisitingPrefixTreeQuery`, `ContainsPrefixTreeQuery`

public abstract class AbstractPrefixTreeQuery extends Query
Base class for Lucene Queries on SpatialPrefixTree fields.

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`
`AbstractPrefixTreeQuery.BaseTermsEnumTraverser`
Holds transient state and docid collecting utility methods as part of traversing a `TermsEnum` for a `LeafReaderContext`.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final int`
`detailLevel`
`protected final String`
`fieldName`
`protected final SpatialPrefixTree`
`grid`
`protected final org.locationtech.spatial4j.shape.Shape`
`queryShape`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`Weight`
`createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)`
`boolean`
`equals(Object o)`
`protected abstract DocIdSet`
`getDocIdSet(LeafReaderContext context)`
`int`
`hashCode()`
`void`
`visit(QueryVisitor visitor)`

### 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

### queryShape

protected final org.locationtech.spatial4j.shape.Shape queryShape

### fieldName

protected final String fieldName

### grid

protected final SpatialPrefixTree grid

### detailLevel

protected final int detailLevel

## Constructor Details

### AbstractPrefixTreeQuery

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

## Method Details

### equals

public boolean equals(Object o)

Specified by:
  `equals` in class `Query`

### hashCode

public int hashCode()

Specified by:
  `hashCode` in class `Query`

### visit

public void visit(QueryVisitor visitor)

Specified by:
  `visit` in class `Query`

### createWeight

public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException

Overrides:
  `createWeight` in class `Query`
Throws:
  `IOException`

### getDocIdSet

protected abstract DocIdSet getDocIdSet(LeafReaderContext context) throws IOException

Throws:
  `IOException`