Indexing + Quering GeoPoint documents

This is more of a how-to question. I've created this mapping for
"places/shops":

  • places:
    {
    • mappings:
      {
      • shops:
        {
        • dynamic: "true",
        • numeric_detection: true,
        • properties:
          {
          • available:
            {
            • type: "boolean"
              },
          • location:
            {
            • type: "geo_point",
            • lat_lon: true,
            • geohash: true
              }
              }
              }
              }
              }

Where I'm using location as the point I'd like to use for GeoDistance
queries.

I'm then indexing a document that looks like;

{"available": true, location: [50, 50]}

I see that the document is indexed when doing a GET for places/shops/1 (I'm
indexing the document at id = 1)

I'm then executing a query using elastic4s in scala which is again quite
simple;
val nearbyFuture:Future[SearchResponse] =
client execute {
search in "places" -> "shops" filter {
geoDistance("location") point(lat, lon) distance(kms)
}
}

In this case lat & lon are both 50.0, and kms = 50 as well. This is a
really simple query and yet I end up with 0 hits.

Whats's going wrong here?

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b7b56190-5dca-4483-a4cb-63f57a709750%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.