org.apache.lucene.spatial.prefix
Class RecursivePrefixTreeFilter

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by org.apache.lucene.spatial.prefix.RecursivePrefixTreeFilter

public class RecursivePrefixTreeFilter
extends Filter

Performs a spatial intersection filter between a query shape and a field indexed with SpatialPrefixTree, a Trie. SPT yields terms (grids) at length 1 (aka "Level 1") and at greater lengths corresponding to greater precisions. This filter recursively traverses each grid length and uses methods on Shape to efficiently know that all points at a prefix fit in the shape or not to either short-circuit unnecessary traversals or to efficiently load all enclosed points. If no indexed data lies in a portion of the shape then that portion of the query shape is quickly passed over without decomposing the shape unnecessarily.

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

Constructor Summary
RecursivePrefixTreeFilter(String fieldName, SpatialPrefixTree grid, com.spatial4j.core.shape.Shape queryShape, int prefixGridScanLevel, int detailLevel)
           
 
Method Summary
 boolean equals(Object o)
           
 DocIdSet getDocIdSet(AtomicReaderContext ctx, Bits acceptDocs)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RecursivePrefixTreeFilter

public RecursivePrefixTreeFilter(String fieldName,
                                 SpatialPrefixTree grid,
                                 com.spatial4j.core.shape.Shape queryShape,
                                 int prefixGridScanLevel,
                                 int detailLevel)
Method Detail

getDocIdSet

public DocIdSet getDocIdSet(AtomicReaderContext ctx,
                            Bits acceptDocs)
                     throws IOException
Specified by:
getDocIdSet in class Filter
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.