Reverse geo distance search

Exactly which version of 7.X are you one that covers 10 releases which is a lot of elasticsearch releases.

Please look closely are the docs here and here

" Elasticsearch supports a circle type, which consists of a center point with a radius. Note that this circle representation can only be indexed when using the recursive Prefix Tree strategy. For the default Indexing approach circles should be approximated using a POLYGON ."

So your mapping is not correct and assuming that you mean London you have the lat and lon reversed in the circles definition, and I assume you mean more than 1mi.

For all types, both the inner type and coordinates fields are required.

In GeoJSON and WKT, and therefore Elasticsearch, the correct coordinate order is longitude, latitude (X, Y) within coordinate arrays. This differs from many Geospatial APIs (e.g., Google Maps) that generally use the colloquial latitude, longitude (Y, X).

You will notice a deprecation notice I will see if I can find out more on this... but the below all works for me.

DELETE my-shapes
PUT my-shapes
{
  "mappings": {
    "properties": {
      "location": {
        "type": "geo_shape",
        "tree": "quadtree"
      }
    }
  }
}

GET my-shapes/_search

PUT my-shapes/_doc/london
{
  "locationName": "london",
  "location": {
    "type": "circle",
    "coordinates": [
      -0.1277583,
      51.5073509
    ],
    "radius": "10000m"
  }
}



DELETE my-index-000001
PUT my-index-000001
{
  "mappings": {
    "properties": {
      "location": {
        "type": "geo_point"
      }
    }
  }
}

PUT my-index-000001/_doc/1
{
  "text": "location 1",
  "location": { 
    "lat": 41.12,
    "lon": -71.34
  }
}

PUT my-index-000001/_doc/2
{
  "text": "location 2",
  "location": { 
    "lat": 45.12,
    "lon": -71.34
  }
}

PUT my-index-000001/_doc/3
{
  "text": "House in london",
  "location": { 
    "lat": 51.5,
    "lon": -0.127
  }
}



GET my-index-000001/_search

GET /my-index-000001/_search
{
  "query": {
    "bool": {
      "filter": {
        "geo_shape": {
          "location": {
            "indexed_shape": {
              "index": "my-shapes",
              "id": "london",
              "path": "location"
            },
            "relation": "intersects"
          }
        }
      }
    }
  }
}

results

{
  "took" : 2,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 1,
      "relation" : "eq"
    },
    "max_score" : 0.0,
    "hits" : [
      {
        "_index" : "my-index-000001",
        "_type" : "_doc",
        "_id" : "3",
        "_score" : 0.0,
        "_source" : {
          "text" : "House in london",
          "location" : {
            "lat" : 51.5,
            "lon" : -0.127
          }
        }
      }
    ]
  }
}