-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Add a switch to disallow slow queries #29050
Copy link
Copy link
Closed
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>enhancementhelp wantedadoptmeadoptme
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>enhancementhelp wantedadoptmeadoptme
Type
Fields
Give feedbackNo fields configured for issues without a type.