org.apache.lucene.spatial.prefix
Class ContainsPrefixTreeFilter

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

public class ContainsPrefixTreeFilter
extends AbstractPrefixTreeFilter

Finds docs where its indexed shape CONTAINS the query shape. For use on RecursivePrefixTreeStrategy.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.spatial.prefix.AbstractPrefixTreeFilter
AbstractPrefixTreeFilter.BaseTermsEnumTraverser
 
Field Summary
protected  boolean multiOverlappingIndexedShapes
          If the spatial data for a document is comprised of multiple overlapping or adjacent parts, it might fail to match a query shape when doing the CONTAINS predicate when the sum of those shapes contain the query shape but none do individually.
 
Fields inherited from class org.apache.lucene.spatial.prefix.AbstractPrefixTreeFilter
detailLevel, fieldName, grid, queryShape
 
Constructor Summary
ContainsPrefixTreeFilter(com.spatial4j.core.shape.Shape queryShape, String fieldName, SpatialPrefixTree grid, int detailLevel, boolean multiOverlappingIndexedShapes)
           
 
Method Summary
 boolean equals(Object o)
           
 DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

multiOverlappingIndexedShapes

protected final boolean multiOverlappingIndexedShapes
If the spatial data for a document is comprised of multiple overlapping or adjacent parts, it might fail to match a query shape when doing the CONTAINS predicate when the sum of those shapes contain the query shape but none do individually. Set this to false to increase performance if you don't care about that circumstance (such as if your indexed data doesn't even have such conditions). See LUCENE-5062.

Constructor Detail

ContainsPrefixTreeFilter

public ContainsPrefixTreeFilter(com.spatial4j.core.shape.Shape queryShape,
                                String fieldName,
                                SpatialPrefixTree grid,
                                int detailLevel,
                                boolean multiOverlappingIndexedShapes)
Method Detail

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractPrefixTreeFilter

getDocIdSet

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


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