org.apache.solr.search.function.distance

## Class GeohashFunction

- java.lang.Object
- - org.apache.lucene.queries.function.ValueSource
  - - 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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ValueSource` | `lat`
    `protected ValueSource` | `lon`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GeohashFunction(ValueSource lat, ValueSource lon)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `description()`
    `boolean` | `equals(Object o)`
    `FunctionValues` | `getValues(Map context, LeafReaderContext 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,
                                          LeafReaderContext 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-2016 Apache Software Foundation. All Rights Reserved.