Search by location

I am trying to find a location search with a spatial example found at http://www.ibm.com/developerworks/java/library/j-spatial/#indexing.approaches .

schema.xml has a geohash field, but this field is not present in any of the .osm files (present in the data folder) used for indexing. I can’t understand how the value is assigned to it, so when I give this request

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

the result set matters geohash. How does this happen? Please help me.

+4
source share
1 answer

The Solr quiz has a pretty good page on how the simplest search can be done with solr 1.5+.

To summarize, your schema defines the entered geohash fields:

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

Data transmitters transmit coordinates with coordinates:

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

You should probably go back to using the simple latitude and longitude coordinates to start with them. There are better documents for this.

+2
source

Source: https://habr.com/ru/post/1302836/


All Articles