Skip to content

Conversation

@matriv
Copy link
Contributor

@matriv matriv commented Feb 12, 2020

Add a new cluster setting search.allow_expensive_queries which by
default is true. If set to false, certain queries that have
usually slow performance cannot be executed and an error message
is returned.

  • Queries that need to do linear scans to identify matches:
    • Script queries
  • Queries that have a high up-front cost:
    • Fuzzy queries
    • Regexp queries
    • Prefix queries (without index_prefixes enabled
    • Wildcard queries
    • Range queries on text and keyword fields
  • Joining queries
    • HasParent queries
    • HasChild queries
    • ParentId queries
    • Nested queries
  • Queries on deprecated 6.x geo shapes (using PrefixTree implementation)
  • Queries that may have a high per-document cost:
    • Script score queries
    • Percolate queries

Closes: #29050
(cherry picked from commit a8b39ed)

Add a new cluster setting `search.allow_expensive_queries` which by
default is `true`. If set to `false`, certain queries that have
usually slow performance cannot be executed and an error message
is returned.

- Queries that need to do linear scans to identify matches:
  - Script queries
- Queries that have a high up-front cost:
  - Fuzzy queries
  - Regexp queries
  - Prefix queries (without index_prefixes enabled
  - Wildcard queries
  - Range queries on text and keyword fields
- Joining queries
  - HasParent queries
  - HasChild queries
  - ParentId queries
  - Nested queries
- Queries on deprecated 6.x geo shapes (using PrefixTree implementation)
- Queries that may have a high per-document cost:
  - Script score queries
  - Percolate queries

Closes: elastic#29050
(cherry picked from commit a8b39ed)
@matriv matriv added >feature :Search/Search Search-related issues that do not fall into other categories backport v7.7.0 labels Feb 12, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport >feature :Search/Search Search-related issues that do not fall into other categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants