|
@@ -28,12 +28,21 @@ PUT idx
|
|
|
|
|
|
While this on the fly reconstruction is *generally* slower than saving the source
|
|
|
documents verbatim and loading them at query time, it saves a lot of storage
|
|
|
-space. There are a couple of restrictions to be aware of:
|
|
|
+space.
|
|
|
+
|
|
|
+[[synthetic-source-restrictions]]
|
|
|
+===== Synthetic `_source` restrictions
|
|
|
+
|
|
|
+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`>>.
|
|
|
+{painless}/painless-field-context.html[`doc`] API or the <<script-fields-api,`field` API>>.
|
|
|
+* Runtime fields <<runtime-fields-scriptless,without a script>>, and runtime
|
|
|
+fields that access `_source` are currently not supported for indices that use
|
|
|
+synthetic `_source`. Use a scripted runtime field that accesses fields <<modules-scripting-doc-vals,using doc values>> or the
|
|
|
+<<script-fields-api,`field` API>> instead.
|
|
|
* Synthetic `_source` can be used with indices that contain only these field
|
|
|
types:
|
|
|
|
|
@@ -59,8 +68,6 @@ types:
|
|
|
** <<version-synthetic-source,`version`>>
|
|
|
** <<wildcard-synthetic-source,`wildcard`>>
|
|
|
|
|
|
-Runtime fields cannot, at this stage, use synthetic `_source`.
|
|
|
-
|
|
|
[[synthetic-source-modifications]]
|
|
|
===== Synthetic `_source` modifications
|
|
|
|