Closed
Description
It has been requested a couple times that we add a switch to disable the use of slow queries. This is typically useful to administrators who would like to prevent some users from using most resources on a cluster.
What a slow query is still needs to be refined but I think we could start with the following definition:
- multi-term queries that don't enforce at least the 5 first chars (eg. prefix queries with a length < 5, fuzzy queries, wildcard queries with a wildcard within the first 5 chars)
- geo-shape queries
- join queries
- script queries
Basically this tries to include all queries that cannot efficiently skip and that need to collect all matches in a bitset to return an iterator. Plus the script query because if you run it on its own it will need to look at every single document of the index.
The threshold of 5 means that you could still run arbitrary prefix queries on fields that use the index_prefix
optimization with default configuration.
Relates #11511