Thanks, I already tried that with no luck. On Thursday, January 16, 2014 11:31:32 AM UTC-6, David Pilato wrote: > > See doc: > http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-sort.html#_geo_distance_sorting > > Missing _ I guess > > -- > *David Pilato* | *Technical Advocate* | *Elasticsearch.com* > @dadoonet <https://twitter.com/dadoonet> | > @elasticsearchfr<https://twitter.com/elasticsearchfr> > > > Le 16 janvier 2014 at 18:21:24, Travis Bullock > ([email protected]<javascript:>) > a écrit: > > Hello, > > I've set up a mapping on myIndex as follows: > > "mappings" : { > "place" : { > "properties" : { > "location" : { > "type" : "geo_point", > "fielddata" : { > "format" : "compressed", > "precision" : "3m" > } > } > } > } > } > > And indexed data like so: > > {"_index":"myIndex","_type":"place","_id":"328","_version":2,"exists":true, > "_source" : {"location":{"lat":42.02397,"lon":-87.684965}} > > > When querying I get an error: > > > { > "index": "myIndex", > "size": 10, > "from": 1, > "type": "place", > "filtered": { > "query": { > "query_string": "test" > }, > "bool": { > "must": [ > { > "geo_distance": { > "distance": "150mi", > "place.location": { > "lat": "41.8781136", > "lon": "-87.6297982" > } > } > } > ] > } > }, > "sort": [ > { > "geo_distance": { > "location": { > "lat": "41.8781136", > "lon": "-87.6297982" > }, > "unit": "mi", > "order": "ASC" > } > } > ] > } > > > The error is "Parse Failure [No mapping found for [[object Object]] in order > to sort on" > > > I've tried changing location to place.location in the sort. > > Also, should I use "_geo_distance" or "geo_distance"? Why are they both used > in different documentation? > > > Thanks! > > Travis > > -- > 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/452ec200-001d-4347-b756-6350b281d59c%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > >
-- 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/31154fe7-e730-4147-946a-e8f8c2912949%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
