Docs: Update scripting.asciidoc

Clarify that doc[...] does not return objects

Closes #7384
This commit is contained in:
Clinton Gormley 2014-09-07 11:39:25 +02:00
parent 51cec43d3c
commit 3bda779336
1 changed files with 3 additions and 1 deletions

View File

@ -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 (cant 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: