Florent,

You probably just want to be careful with your index names, type, mapping, 
and actual document. So if you do something like this, it should work:

1) PUT http://localhost:9200/try

2) PUT http://localhost:9200/try/pin/_mapping
{
   "pin": {
      "properties": {
         "location": {
            "type": "geo_point",
            "lat_lon": "true"
         },
         "text": {
            "type": "string"
         }
      }
   }
}

3) POST http://localhost:9200/try/pin/1
{ 
        "location" : { 
            "lat" : 40.20, 
            "lon" : -71.44 
        },         
         "text" : "a great hostel"
}

4) GET http://localhost:9200/try/_search
{
  "query": {
    "match_all": {}
  },
  "filter": {
    "geo_distance": {
      "distance": "1200km",
      "location": {
        "lat": 40.15,
        "lon": -71.4
      }
    }
  }
}

-- 
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/78532d9c-ced0-4627-809e-670e95b00cb3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to