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

This commit is contained in:
Emanuil Tolev 2023-03-09 14:57:17 +00:00 committed by GitHub
parent a2837a2e3f
commit 9b2c921272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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