浏览代码

Docs: synthetic _source can't params._source (#91630)

This documents that `params._source` isn't available for synthetic
`_source` indices and suggests to instead use `doc['foo']` or
`field('foo')`.
Nik Everett 2 年之前
父节点
当前提交
b9bb7252be
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      docs/reference/mapping/fields/synthetic-source.asciidoc

+ 2 - 0
docs/reference/mapping/fields/synthetic-source.asciidoc

@@ -32,6 +32,8 @@ space. There are a couple of restrictions to be aware of:
 
 * When you retrieve synthetic `_source` content it undergoes minor
 <<synthetic-source-modifications,modifications>> compared to the original JSON.
+* The `params._source` is unavailable in scripts. Instead use the
+{painless}/painless-field-context.html[`doc`] API or the <<script-fields-api, `field`>>.
 * Synthetic `_source` can be used with indices that contain only these field
 types: