org.apache.lucene.spatial.util
Class ShapeFieldCacheDistanceValueSource

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

public class ShapeFieldCacheDistanceValueSource
extends ValueSource

An implementation of the Lucene ValueSource that returns the spatial distance between an input point and a document's points in ShapeFieldCacheProvider. The shortest distance is returned if a document has more than one point.

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

Constructor Summary
ShapeFieldCacheDistanceValueSource(com.spatial4j.core.context.SpatialContext ctx, ShapeFieldCacheProvider<com.spatial4j.core.shape.Point> provider, com.spatial4j.core.shape.Point from, double multiplier)
           
 
Method Summary
 String description()
           
 boolean equals(Object o)
           
 FunctionValues getValues(Map context, AtomicReaderContext readerContext)
           
 int hashCode()
           
 
Methods inherited from class org.apache.lucene.queries.function.ValueSource
createWeight, getSortField, newContext, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShapeFieldCacheDistanceValueSource

public ShapeFieldCacheDistanceValueSource(com.spatial4j.core.context.SpatialContext ctx,
                                          ShapeFieldCacheProvider<com.spatial4j.core.shape.Point> provider,
                                          com.spatial4j.core.shape.Point from,
                                          double multiplier)
Method Detail

description

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

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-2013 Apache Software Foundation. All Rights Reserved.