From c197c010bd562997788b43e2514e5505ec8eb30e Mon Sep 17 00:00:00 2001 From: Pius Date: Thu, 13 Aug 2020 13:43:33 -0700 Subject: [PATCH 1/3] Max field expansions is not a hard limit >Limiting the number of auto-expanded fieldsedit Executing queries that use automatic expansion of fields (e.g. query_string, simple_query_string or multi_match) can have performance issues for indices with a large numbers of fields. To safeguard against this, a hard limit of 1024 fields has been introduced for queries using the "all fields" mode ("default_field": "") or other fieldname expansions (e.g. "foo"). Per https://github.com/elastic/elasticsearch/pull/35284, it looks like we changed this from a hard limit to a soft limit by leveraging `indices.query.bool.max_clause_count` in 7.0 beta1. We will want to backport this to all 7.x versions. --- docs/reference/migration/migrate_7_0/search.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference/migration/migrate_7_0/search.asciidoc b/docs/reference/migration/migrate_7_0/search.asciidoc index 701b1a9f8e6b8..e323b4124347a 100644 --- a/docs/reference/migration/migrate_7_0/search.asciidoc +++ b/docs/reference/migration/migrate_7_0/search.asciidoc @@ -149,8 +149,9 @@ for a particular index with the index setting `index.max_regex_length`. Executing queries that use automatic expansion of fields (e.g. `query_string`, `simple_query_string` or `multi_match`) can have performance issues for indices with a large numbers of fields. -To safeguard against this, a hard limit of 1024 fields has been introduced for queries +To safeguard against this, a soft limit of 1024 fields has been introduced for queries using the "all fields" mode ("default_field": "*") or other fieldname expansions (e.g. "foo*"). +This default maximum can be changed with the dynamic cluster setting `indices.query.bool.max_clause_count`. [discrete] [[invalid-search-request-body]] From f697ce27a55169415a2b8a30db918fadadacb478 Mon Sep 17 00:00:00 2001 From: James Rodewig <40268737+jrodewig@users.noreply.github.com> Date: Tue, 18 Aug 2020 10:40:45 -0400 Subject: [PATCH 2/3] Update docs/reference/migration/migrate_7_0/search.asciidoc --- docs/reference/migration/migrate_7_0/search.asciidoc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/reference/migration/migrate_7_0/search.asciidoc b/docs/reference/migration/migrate_7_0/search.asciidoc index e323b4124347a..a5fec109205f8 100644 --- a/docs/reference/migration/migrate_7_0/search.asciidoc +++ b/docs/reference/migration/migrate_7_0/search.asciidoc @@ -149,9 +149,11 @@ for a particular index with the index setting `index.max_regex_length`. Executing queries that use automatic expansion of fields (e.g. `query_string`, `simple_query_string` or `multi_match`) can have performance issues for indices with a large numbers of fields. -To safeguard against this, a soft limit of 1024 fields has been introduced for queries -using the "all fields" mode ("default_field": "*") or other fieldname expansions (e.g. "foo*"). -This default maximum can be changed with the dynamic cluster setting `indices.query.bool.max_clause_count`. +To safeguard against this, a default limit of 1024 fields has been introduced for +queries using the "all fields" mode ("default_field": "*") or other fieldname +expansions (e.g. "foo*"). If needed, you can change this limit using the +<> +dynamic cluster setting. [discrete] [[invalid-search-request-body]] From 1eec1c2c4b5f373b7ac075d7306d214340ba7c94 Mon Sep 17 00:00:00 2001 From: James Rodewig <40268737+jrodewig@users.noreply.github.com> Date: Tue, 18 Aug 2020 10:51:21 -0400 Subject: [PATCH 3/3] Fix formatting --- docs/reference/migration/migrate_7_0/search.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/migration/migrate_7_0/search.asciidoc b/docs/reference/migration/migrate_7_0/search.asciidoc index a5fec109205f8..1a05d94879081 100644 --- a/docs/reference/migration/migrate_7_0/search.asciidoc +++ b/docs/reference/migration/migrate_7_0/search.asciidoc @@ -150,8 +150,8 @@ for a particular index with the index setting `index.max_regex_length`. Executing queries that use automatic expansion of fields (e.g. `query_string`, `simple_query_string` or `multi_match`) can have performance issues for indices with a large numbers of fields. To safeguard against this, a default limit of 1024 fields has been introduced for -queries using the "all fields" mode ("default_field": "*") or other fieldname -expansions (e.g. "foo*"). If needed, you can change this limit using the +queries using the "all fields" mode (`"default_field": "*"`) or other fieldname +expansions (e.g. `"foo*"`). If needed, you can change this limit using the <> dynamic cluster setting.