<p dir="auto">Hey,</p>
<p dir="auto">had to describe the issue in one line, here is the possibiltiy to reproduce</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DELETE campaigns
PUT campaigns
{
   &quot;mappings&quot; : {
      &quot;campaign&quot; : {
         &quot;properties&quot; : {
            &quot;location&quot; : {
                &quot;type&quot;: &quot;geo_shape&quot;,
                &quot;tree&quot;: &quot;quadtree&quot;
            }
         }
      }
   }
}

POST /campaigns/campaign/1
{
  &quot;location&quot; : {
      &quot;type&quot; : &quot;circle&quot;,
      &quot;coordinates&quot; : [45.01, 2.26],
      &quot;radius&quot; : &quot;9000m&quot;
  }
}

POST campaigns/campaign/
{
  &quot;_id&quot;: { &quot;c_id&quot;: &quot;1891&quot;},
  &quot;location&quot; : {
      &quot;type&quot; : &quot;circle&quot;,
      &quot;coordinates&quot; : [45.01, 2.26],
      &quot;radius&quot; : &quot;9000m&quot;
  }
}

GET campaigns/campaign/_search

GET campaigns/campaign/_search
{
    &quot;query&quot;:{
        &quot;filtered&quot;: {
            &quot;query&quot;: {
                &quot;match_all&quot;: {}
            },
            &quot;filter&quot;: {
                &quot;geo_shape&quot;: {
                    &quot;location&quot;: {
                   &quot;relation&quot;: &quot;intersects&quot;,
                        &quot;shape&quot;: {
                            &quot;type&quot;: &quot;circle&quot;,
                            &quot;coordinates&quot; : [45.01001, 2.26],
                            &quot;radius&quot;:&quot;1m&quot;
                        }
                    }
                }
            }
        }
    }
}"><pre class="notranslate"><code class="notranslate">DELETE campaigns
PUT campaigns
{
   "mappings" : {
      "campaign" : {
         "properties" : {
            "location" : {
                "type": "geo_shape",
                "tree": "quadtree"
            }
         }
      }
   }
}

POST /campaigns/campaign/1
{
  "location" : {
      "type" : "circle",
      "coordinates" : [45.01, 2.26],
      "radius" : "9000m"
  }
}

POST campaigns/campaign/
{
  "_id": { "c_id": "1891"},
  "location" : {
      "type" : "circle",
      "coordinates" : [45.01, 2.26],
      "radius" : "9000m"
  }
}

GET campaigns/campaign/_search

GET campaigns/campaign/_search
{
    "query":{
        "filtered": {
            "query": {
                "match_all": {}
            },
            "filter": {
                "geo_shape": {
                    "location": {
                   "relation": "intersects",
                        "shape": {
                            "type": "circle",
                            "coordinates" : [45.01001, 2.26],
                            "radius":"1m"
                        }
                    }
                }
            }
        }
    }
}
</code></pre></div>
<p dir="auto">You can see the difference between match all and the geo shape query, even though the points are the same. If you remove the <code class="notranslate">_id</code> field from the document, everything works, so maybe the IdFieldMapper throws an Exception (rightfully, as an id cannot be an object) and then the rest of the document is not indexed.</p>
<p dir="auto">If you replace the <code class="notranslate">_id</code> object with a string, you get an exception, that the id values dont match as one ID is autogenerated. Not sure, if this is the desired behaviour.</p>
<p dir="auto">Currently routing and ID values can be passed in the query string and url respectively, but they can also be extracted from fields within the document.</p>
<p dir="auto">This has a significant performance impact because each doc needs to be parsed on the node which receives the index/get/update/delete request in order to know which node should handle the request.</p>
<p dir="auto">On top of that, there are clashes between (eg) routing values set in fields and parent settings.</p>
<p dir="auto">We should deprecate the functionality to extract these values from fields, and make it the responsibility of the client code instead.</p>
<p dir="auto">It should still be possible to set <code class="notranslate">_routing</code> to required.  Perhaps we should set this automatically if the user ever passes in a routing or parent value at index time?</p>
<p dir="auto">Relates to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="51553271" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/8870" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/8870/hovercard" href="https://github.com/elastic/elasticsearch/issues/8870">#8870</a></p>