Skip to content

Add a switch to disallow slow queries #29050

Closed
@jpountz

Description

@jpountz

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions