<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>
<p dir="auto"><strong>Describe the feature</strong>:</p>
<blockquote>
<p dir="auto">The way it works is that Elasticsearch keeps track of the 256 most recently used filters, and only caches those that appear 5 times or more in this history.</p>
</blockquote>
<p dir="auto">We currently tracks 256 in the history and caches only those that appear 5 times or more in the history, so it will end up caching maybe 50 or so distinct filters.  In a multitenant environment, there can easily be more than 50 distinct filters for each customer id, so it will be nice to provide a way to tune this based on the use case.</p>