From 4790f7e258cb235e5b0c705890051fd220edce16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Tue, 23 Oct 2018 23:50:40 +0200 Subject: [PATCH] [Docs] Add `indices.query.bool.max_clause_count` setting This change adds a section about the global search setting `indices.query.bool.max_clause_count` that limits the number of boolean clauses allowed in a Lucene BooleanQuery. Closes #19858 --- docs/reference/modules/indices.asciidoc | 6 ++++++ .../modules/indices/search-settings.asciidoc | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 docs/reference/modules/indices/search-settings.asciidoc diff --git a/docs/reference/modules/indices.asciidoc b/docs/reference/modules/indices.asciidoc index 5f7bb7b9abae5..33ab7ecb4a814 100644 --- a/docs/reference/modules/indices.asciidoc +++ b/docs/reference/modules/indices.asciidoc @@ -30,6 +30,10 @@ Available settings include: Control the resource limits on the shard recovery process. +<>:: + + Control global search settings. + include::indices/circuit_breaker.asciidoc[] include::indices/fielddata.asciidoc[] @@ -42,3 +46,5 @@ include::indices/request_cache.asciidoc[] include::indices/recovery.asciidoc[] +include::indices/search-settings.asciidoc[] + diff --git a/docs/reference/modules/indices/search-settings.asciidoc b/docs/reference/modules/indices/search-settings.asciidoc new file mode 100644 index 0000000000000..ad75de1291cdc --- /dev/null +++ b/docs/reference/modules/indices/search-settings.asciidoc @@ -0,0 +1,16 @@ +[[search-settings]] +=== Search Settings + +The following _expert_ setting can be set to manage global search limits. + +`indices.query.bool.max_clause_count`:: + Defaults to `1024`. + +This setting limits the number of clauses a Lucene BooleanQuery can have. The +default of 1024 is quite high and should normally be sufficient. This limit does +not only affect Elasticsearchs `bool` query, but many other queries are rewritten to Lucene's +BooleanQuery internally. The limit is in place to prevent searches from becoming to large +and taking up too much CPU and memory. In case you consider to increase this setting, +make sure you exhausted all other options to avoid having to do this. Higher values can lead +to performance degradations and memory issues, especially in clusters with a high load or +few resources.