Skip to content

Commit b126c1a

Browse files
[DOCS] Clarify TSDS/synthetic source/runtime field restrictions (#97980) (#98177)
1 parent 5f50593 commit b126c1a

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

docs/reference/data-streams/tsds.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ shard segments by `_tsid` and `@timestamp`.
5353
documents, the document `_id` is a hash of the document's dimensions and
5454
`@timestamp`. A TSDS doesn't support custom document `_id` values.
5555

56+
* A TSDS uses <<synthetic-source,synthetic `_source`>>, and as a result is
57+
subject to a number of <<synthetic-source-restrictions,restrictions>>.
58+
5659
[discrete]
5760
[[time-series]]
5861
=== What is a time series?

docs/reference/mapping/fields/synthetic-source.asciidoc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,21 @@ PUT idx
2828

2929
While this on the fly reconstruction is *generally* slower than saving the source
3030
documents verbatim and loading them at query time, it saves a lot of storage
31-
space. There are a couple of restrictions to be aware of:
31+
space.
32+
33+
[[synthetic-source-restrictions]]
34+
===== Synthetic `_source` restrictions
35+
36+
There are a couple of restrictions to be aware of:
3237

3338
* When you retrieve synthetic `_source` content it undergoes minor
3439
<<synthetic-source-modifications,modifications>> compared to the original JSON.
3540
* The `params._source` is unavailable in scripts. Instead use the
36-
{painless}/painless-field-context.html[`doc`] API or the <<script-fields-api, `field`>>.
41+
{painless}/painless-field-context.html[`doc`] API or the <<script-fields-api,`field` API>>.
42+
* Runtime fields <<runtime-fields-scriptless,without a script>>, and runtime
43+
fields that access `_source` are currently not supported for indices that use
44+
synthetic `_source`. Use a scripted runtime field that accesses fields <<modules-scripting-doc-vals,using doc values>> or the
45+
<<script-fields-api,`field` API>> instead.
3746
* Synthetic `_source` can be used with indices that contain only these field
3847
types:
3948

@@ -59,8 +68,6 @@ types:
5968
** <<version-synthetic-source,`version`>>
6069
** <<wildcard-synthetic-source,`wildcard`>>
6170

62-
Runtime fields cannot, at this stage, use synthetic `_source`.
63-
6471
[[synthetic-source-modifications]]
6572
===== Synthetic `_source` modifications
6673

0 commit comments

Comments
 (0)