Hi David. Thanks for your reply.I also received a solution from issues in Gig Hub repository (I was new to elasticsearch and mixed question place) . Here is the link for the others who want to make this example work : https://github.com/elasticsearch/elasticsearch/issues/8152 .Thank you again for your fast reply.
On Sunday, October 19, 2014 9:17:41 PM UTC+2, David Pilato wrote: > > That's what I said. Your mapping is set for pin and not for location. > > -- > David ;-) > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs > > Le 19 oct. 2014 à 20:17, Driton Alija <[email protected] <javascript:>> > a écrit : > > Hi David. > > Thank you for your reply and help. > > No I did the mapping for location not for pin. > > Here is the attachment from the mapping that I did. > > I appreciate your help. > > > <https://lh5.googleusercontent.com/-KlNYMUCpIn8/VEP_yPU18gI/AAAAAAAAAEM/R1dlp1lMD3Q/s1600/mapping_geo.PNG> > > > On Sunday, October 19, 2014 8:07:12 PM UTC+2, David Pilato wrote: >> >> It sounds like you created a mapping for type pin but sent documents with >> location type. >> >> I'd check the index creation command. Check the mapping for location. >> >> >> -- >> David ;-) >> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs >> >> Le 19 oct. 2014 à 18:51, Driton Alija <[email protected]> a écrit : >> >> Hi all. I want to be able to search with geo distance in ES 1.3.4. >> I did geo mapping: >> POST /geo/ >> { "mappings":{ >> "pin" : { >> "properties" : { >> "location" : { >> "type" : "geo_point" >> } >> } >> } >> } >> } >> Added some data in this format: >> PUT /geo/location/1 >> { >> "pin" : { >> "location" : { >> "lat" : 42.4398181, >> "lon" : 21.466074 >> }, >> "text" : "Geolocation distance search" >> } >> } >> Tried to search with geo_distance filter: >> POST geo/location/_search >> { >> "query": {"filtered": { >> "query": { >> "match_all": {}}, >> "filter": { >> "geo_distance": { >> "distance": "500", >> "distance_unit": "km", >> "pin.location": { >> "lat" : 42.1, >> "lon" : 21.1 >> } >> } >> } >> }} >> } >> And always getting 0 results even that this distance is 48.32 km. >> I tried many options and ES always returns 0 results to me. >> ( I used sense extension above) >> >> -- >> You received this message because you are subscribed to the Google Groups >> "elasticsearch" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elasticsearch/fa9dc0f4-be05-4756-9cfb-3486cdd9a178%40googlegroups.com >> >> <https://groups.google.com/d/msgid/elasticsearch/fa9dc0f4-be05-4756-9cfb-3486cdd9a178%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> >> -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/8eac344a-90a5-4edb-87d1-0624abb06058%40googlegroups.com > > <https://groups.google.com/d/msgid/elasticsearch/8eac344a-90a5-4edb-87d1-0624abb06058%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/af409db3-6b93-4ac0-8cdb-d8f91c2d50b3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
