Class GeohashFunction


  • public class GeohashFunction
    extends org.apache.lucene.queries.function.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

      Fields 
      Modifier and Type Field Description
      protected org.apache.lucene.queries.function.ValueSource lat  
      protected org.apache.lucene.queries.function.ValueSource lon  
    • Constructor Summary

      Constructors 
      Constructor Description
      GeohashFunction​(org.apache.lucene.queries.function.ValueSource lat, org.apache.lucene.queries.function.ValueSource lon)  
    • Field Detail

      • lat

        protected org.apache.lucene.queries.function.ValueSource lat
      • lon

        protected org.apache.lucene.queries.function.ValueSource lon
    • Constructor Detail

      • GeohashFunction

        public GeohashFunction​(org.apache.lucene.queries.function.ValueSource lat,
                               org.apache.lucene.queries.function.ValueSource lon)
    • Method Detail

      • name

        protected String name()
      • getValues

        public org.apache.lucene.queries.function.FunctionValues getValues​(Map context,
                                                                           org.apache.lucene.index.LeafReaderContext readerContext)
                                                                    throws IOException
        Specified by:
        getValues in class org.apache.lucene.queries.function.ValueSource
        Throws:
        IOException
      • equals

        public boolean equals​(Object o)
        Specified by:
        equals in class org.apache.lucene.queries.function.ValueSource
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class org.apache.lucene.queries.function.ValueSource
      • description

        public String description()
        Specified by:
        description in class org.apache.lucene.queries.function.ValueSource