From 66505860affcd0f74b977317ac06a1e29745f698 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Tue, 25 Jan 2022 10:27:10 -0500 Subject: [PATCH] [DOCS] Re-add network traffic para to `term` query (#83047) Re-adds a paragraph about minimizing network traffic for a terms lookup. This paragraph was erroneously removed as part of https://github.com/elastic/elasticsearch/pull/42889. (cherry picked from commit b552d5cb0e475ade163d0a6b4d43feb940007dec) --- docs/reference/query-dsl/terms-query.asciidoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/reference/query-dsl/terms-query.asciidoc b/docs/reference/query-dsl/terms-query.asciidoc index a39fa5c0b0fc1..4b669ffa6923a 100644 --- a/docs/reference/query-dsl/terms-query.asciidoc +++ b/docs/reference/query-dsl/terms-query.asciidoc @@ -88,10 +88,16 @@ By default, {es} limits the `terms` query to a maximum of 65,536 terms. This includes terms fetched using terms lookup. You can change this limit using the <> setting. +To reduce network traffic, a terms lookup will fetch the document's values from +a shard on a local data node if possible. If the your terms data is not large, +consider using an index with a single primary shard that's fully replicated +across all applicable data nodes to minimize network traffic. + To perform a terms lookup, use the following parameters. [[query-dsl-terms-lookup-params]] ====== Terms lookup parameters + `index`:: (Required, string) Name of the index from which to fetch field values.