From dceff3f86288368aaa022139b29feca5302a7906 Mon Sep 17 00:00:00 2001 From: Abdon Pijpelink Date: Mon, 14 Nov 2022 14:05:40 +0100 Subject: [PATCH] [DOCS] Warn about potential overhead of named queries (#91512) --- docs/reference/query-dsl/bool-query.asciidoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/reference/query-dsl/bool-query.asciidoc b/docs/reference/query-dsl/bool-query.asciidoc index 3eaee4335f02d..3ab695d538caa 100644 --- a/docs/reference/query-dsl/bool-query.asciidoc +++ b/docs/reference/query-dsl/bool-query.asciidoc @@ -169,3 +169,9 @@ GET /_search } } ---- + +NOTE: This functionality reruns each named query on every hit in a search +response. Typically, this adds a small overhead to a request. However, using +computationally expensive named queries on a large number of hits may add +significant overhead. For example, named queries in combination with a +`top_hits` aggregation on many buckets may lead to longer response times. \ No newline at end of file