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]> 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. > > > > > >> 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. >>> 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/8eac344a-90a5-4edb-87d1-0624abb06058%40googlegroups.com. > 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/41E5AD89-76DD-4FF8-8303-897EEF9D00ED%40pilato.fr. For more options, visit https://groups.google.com/d/optout.
