org.apache.lucene.spatial.util
Class ShapePredicateValueSource

java.lang.Object
  extended by org.apache.lucene.queries.function.ValueSource
      extended by org.apache.lucene.spatial.util.ShapePredicateValueSource

public class ShapePredicateValueSource
extends ValueSource

A boolean ValueSource that compares a shape from a provided ValueSource with a given Shape and sees if it matches a given SpatialOperation (the predicate).

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

Constructor Summary
ShapePredicateValueSource(ValueSource shapeValuesource, SpatialOperation op, com.spatial4j.core.shape.Shape queryShape)
           
 
Method Summary
 void createWeight(Map context, IndexSearcher searcher)
           
 String description()
           
 boolean equals(Object o)
           
 FunctionValues getValues(Map context, AtomicReaderContext readerContext)
           
 int hashCode()
           
 
Methods inherited from class org.apache.lucene.queries.function.ValueSource
getSortField, newContext, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShapePredicateValueSource

public ShapePredicateValueSource(ValueSource shapeValuesource,
                                 SpatialOperation op,
                                 com.spatial4j.core.shape.Shape queryShape)
Parameters:
shapeValuesource - Must yield Shape instances from it's objectVal(doc). If null then the result is false. This is the left-hand (indexed) side.
op - the predicate
queryShape - The shape on the right-hand (query) side.
Method Detail

description

public String description()
Specified by:
description in class ValueSource

createWeight

public void createWeight(Map context,
                         IndexSearcher searcher)
                  throws IOException
Overrides:
createWeight in class ValueSource
Throws:
IOException

getValues

public FunctionValues getValues(Map context,
                                AtomicReaderContext readerContext)
                         throws IOException
Specified by:
getValues in class ValueSource
Throws:
IOException

equals

public boolean equals(Object o)
Specified by:
equals in class ValueSource

hashCode

public int hashCode()
Specified by:
hashCode in class ValueSource


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