tags:

views:

105

answers:

1

Hi, I am trying location aware search with spatial example found in http://www.ibm.com/developerworks/java/library/j-spatial/#indexing.approaches.

The schema.xml has geohash field ,but this field is not present in any of the .osm files(present in data folder) used to index. Am not able to understand how value is assigned to it , so that when i give this query

http://localhost:8983/solr/select/?q=_val_:"recip (ghhsin(geohash(44.79, -93), geohash, 3963.205), 1, 1, 0)"^100

result set has geohash value retrieved . How is it happening? pls help me. Thanks in advance.

+1  A: 

The Solr wiki has a pretty good page on how Spatial search can be done with solr 1.5+.

To summarize, your schema defines 'geohash' typed fields:

<fieldtype name="geohash" class="solr.GeoHashField"/>
<field name="destination" type="geohash" indexed="true" stored="true"/>

Data feeders pass in geohashed coordinates:

<field name="destination">cbj1pb56p4b</field> <!-- 45.17614 -93.87341 -->

You probably should go back to using simple latitude and longitude coordinates to start off with. There are better docs for it.

Nick Gerakines