From 3bda779336d58e432ef987308ac8affe0ac2e9ee Mon Sep 17 00:00:00 2001 From: Clinton Gormley Date: Sun, 7 Sep 2014 11:39:25 +0200 Subject: [PATCH] Docs: Update scripting.asciidoc Clarify that doc[...] does not return objects Closes #7384 --- docs/reference/modules/scripting.asciidoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/reference/modules/scripting.asciidoc b/docs/reference/modules/scripting.asciidoc index c5a96b34e2f..7d9860ba845 100644 --- a/docs/reference/modules/scripting.asciidoc +++ b/docs/reference/modules/scripting.asciidoc @@ -321,7 +321,9 @@ The `doc['field_name']` can be used to access specific field data within a document (the document in question is usually derived by the context the script is used). Document fields are very fast to access since they end up being loaded into memory (all the relevant field values/tokens -are loaded to memory). +are loaded to memory). Note, however, that the `doc[...]` notation only +allows for simple valued fields (can’t return a json object from it) +and makes sense only on non-analyzed or single term based fields. The following data can be extracted from a field: