Browse Source

Clarify update scripts docs on doc vs ctx use (#66357)

Emanuil Tolev 2 years ago
parent
commit
9b2c921272
1 changed files with 2 additions and 0 deletions
  1. 2 0
      docs/reference/scripting/fields.asciidoc

+ 2 - 0
docs/reference/scripting/fields.asciidoc

@@ -16,6 +16,8 @@ API will have access to the `ctx` variable which exposes:
 `ctx.op`::          The operation that should be applied to the document: `index` or `delete`.
 `ctx._index` etc::  Access to <<mapping-fields,document metadata fields>>, some of which may be read-only.
 
+These scripts do not have access to the `doc` variable and have to use `ctx` to access the documents they operate on.
+
 [discrete]
 == Search and aggregation scripts