From 0877bbc1c9d890bdb6a392f840ad8b007ac1e06d Mon Sep 17 00:00:00 2001 From: Adam Locke Date: Wed, 1 Sep 2021 14:17:37 -0400 Subject: [PATCH] [DOCS] Clarify indexing a runtime field (#77117) (#77139) * [DOCS] Clarify indexing a runtime field * Clarify wording based on reviewer feedback # Conflicts: # docs/reference/mapping/runtime.asciidoc --- docs/reference/mapping/runtime.asciidoc | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/reference/mapping/runtime.asciidoc b/docs/reference/mapping/runtime.asciidoc index eafc18eb2cf87..8b8c2d3df0fb7 100644 --- a/docs/reference/mapping/runtime.asciidoc +++ b/docs/reference/mapping/runtime.asciidoc @@ -87,12 +87,12 @@ your data, but can impact search performance based on the computation defined in the runtime script. To balance search performance and flexibility, index fields that you'll -frequently search for, aggregate and filter on, such as a timestamp. {es} automatically uses -these indexed fields first when running a query, resulting in a fast response -time. You can then use runtime fields to limit the number of fields that {es} -needs to calculate values for. Using indexed fields in tandem with runtime -fields provides flexibility in the data that you index and how you define -queries for other fields. +frequently search for and filter on, such as a timestamp. {es} automatically +uses these indexed fields first when running a query, resulting in a fast +response time. You can then use runtime fields to limit the number of fields +that {es} needs to calculate values for. Using indexed fields in tandem with +runtime fields provides flexibility in the data that you index and how you +define queries for other fields. Use the <> to run searches that include runtime fields. This method of search helps to offset the performance impacts @@ -820,8 +820,14 @@ can define runtime fields in the <> of an index mapping. If you decide to index a runtime field for greater performance, just move the full runtime field definition (including the script) to the context of an index -mapping. This capability means you can write a script only once, and apply -it to any context that supports runtime fields. +mapping. {es} automatically uses these indexed fields to drive queries, +resulting in a fast response time. This capability means you can write a +script only once, and apply it to any context that supports runtime fields. + +You can then use runtime fields to limit the number of fields that {es} needs +to calculate values for. Using indexed fields in tandem with runtime fields +provides flexibility in the data that you index and how you define queries for +other fields. IMPORTANT: After indexing a runtime field, you cannot update the included script. If you need to change the script, create a new field with the updated