org.apache.solr.search.function.distance
Class GeohashFunction

java.lang.Object
  extended by org.apache.lucene.queries.function.ValueSource
      extended by org.apache.solr.search.function.distance.GeohashFunction

public class GeohashFunction
extends ValueSource

Takes in a latitude and longitude ValueSource and produces a GeoHash.

Ex: geohash(lat, lon)

Note, there is no reciprocal function for this.


Field Summary
protected  ValueSource lat
           
protected  ValueSource lon
           
 
Constructor Summary
GeohashFunction(ValueSource lat, ValueSource lon)
           
 
Method Summary
 String description()
           
 boolean equals(Object o)
           
 FunctionValues getValues(Map context, AtomicReaderContext readerContext)
           
 int hashCode()
           
protected  String name()
           
 
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
 

Field Detail

lat

protected ValueSource lat

lon

protected ValueSource lon
Constructor Detail

GeohashFunction

public GeohashFunction(ValueSource lat,
                       ValueSource lon)
Method Detail

name

protected String name()

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

description

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


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