Skip to content

Commit c0c6a28

Browse files
author
Christoph Büscher
authored
[Docs] Add indices.query.bool.max_clause_count setting (#34779)
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
1 parent 3225b2d commit c0c6a28

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

docs/reference/modules/indices.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ Available settings include:
3030

3131
Control the resource limits on the shard recovery process.
3232

33+
<<search-settings,Search Settings>>::
34+
35+
Control global search settings.
36+
3337
include::indices/circuit_breaker.asciidoc[]
3438

3539
include::indices/fielddata.asciidoc[]
@@ -42,3 +46,5 @@ include::indices/request_cache.asciidoc[]
4246

4347
include::indices/recovery.asciidoc[]
4448

49+
include::indices/search-settings.asciidoc[]
50+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[[search-settings]]
2+
=== Search Settings
3+
4+
The following _expert_ setting can be set to manage global search limits.
5+
6+
`indices.query.bool.max_clause_count`::
7+
Defaults to `1024`.
8+
9+
This setting limits the number of clauses a Lucene BooleanQuery can have. The
10+
default of 1024 is quite high and should normally be sufficient. This limit does
11+
not only affect Elasticsearchs `bool` query, but many other queries are rewritten to Lucene's
12+
BooleanQuery internally. The limit is in place to prevent searches from becoming to large
13+
and taking up too much CPU and memory. In case you consider to increase this setting,
14+
make sure you exhausted all other options to avoid having to do this. Higher values can lead
15+
to performance degradations and memory issues, especially in clusters with a high load or
16+
few resources.

0 commit comments

Comments
 (0)