When I retrieve the value the lat/lon pair that comes out is not exactly the same as what I indexed, which made be think it was actually stored as the hash and then transformed back?
Anyhow - I'm trying to understand the actual use case for the field as it exists - essentially you are saying I could query with a geohash and use data in this field type to do a distance-based filter from the lat,lon point corresponding to the geohash? -Peter On Thu, Sep 8, 2011 at 5:34 PM, Chris Hostetter <hossman_luc...@fucit.org> wrote: > > : I would think I could index a lat,lon pair into a GeoHashField (that > : works) and then retrieve the field value to see the computed geohash. > ... > : What am I missing - how can I retrieve the hash? > > I don't think it's designed to work that way. > > GeoHashField provides GeoHash based search support for lat/lon values > through it's internal (indexed) representaiton -- much like TrieLongField > provides efficient range queries using trie encoding -- but the "stored" > value is still the lat/lon pair (just as a TrieLongField is still the long > value) > > If you want to store/retrive a raq GeoHash string, i think you have to > compute it yourself (or put the logic in an UpdateProcessor). > > org.apache.lucene.spatial.geohash.GeoHashUtils should take care of all the > heavy lifting for you. > > -Hoss > -- Peter M. Wolanin, Ph.D. : Momentum Specialist, Acquia. Inc. peter.wola...@acquia.com : 781-313-8322 "Get a free, hosted Drupal 7 site: http://www.drupalgardens.com"