Skip to content

Commit ce4b95e

Browse files
authored
[DOCS] Document time_series_metric mapping parameter (#78013)
Changes: * Documents the `time_series_metric` mapping parameter for PR #76766. * Renames the `dimension` parameter to `time_series_dimension` for PR #78012. * Adds support for `unsigned_long` to `time_series_dimension` for PR #78204.
1 parent 339d9f0 commit ce4b95e

File tree

6 files changed

+59
-36
lines changed

6 files changed

+59
-36
lines changed

docs/reference/index-modules.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ pipeline attempts to change the `_index` field, the indexing request will fail.
334334
For internal use by Elastic only. Maximum number of time series dimensions for
335335
the index. Defaults to `16`.
336336
+
337-
You can mark a field as a dimension using the `dimension` mapping parameter.
337+
You can mark a field as a dimension using the `time_series_dimension` mapping
338+
parameter.
338339

339340
[[index-hidden]] `index.hidden`::
340341

docs/reference/mapping/types/aggregate-metric-double.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ specify at least one value.
5757
Default metric sub-field to use for queries, scripts, and aggregations that
5858
don't use a sub-field. Must be a value from the `metrics` array.
5959

60+
include::numeric.asciidoc[tag=time_series_metric]
61+
+
62+
For `aggregate_metric_double` fields, this parameter accepts `counter`, `gauge`,
63+
and `summary`. You can't update this parameter for existing fields.
64+
6065
[[aggregate-metric-double-uses]]
6166
==== Uses
6267

docs/reference/mapping/types/histogram.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ per document. Nested arrays are not supported.
2424
* `histogram` fields do not support sorting.
2525
========
2626

27+
[[histogram-params]]
28+
==== Parameters
29+
30+
include::numeric.asciidoc[tag=time_series_metric]
31+
+
32+
For `histogram` fields, this parameter accepts `histogram`. You can't update
33+
this parameter for existing fields.
34+
2735
[[histogram-uses]]
2836
==== Uses
2937

docs/reference/mapping/types/ip.asciidoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ NOTE: You can also store ip ranges in a single field using an <<range,ip_range d
4343

4444
The following parameters are accepted by `ip` fields:
4545

46-
[horizontal]
47-
48-
include::keyword.asciidoc[tag=dimension]
49-
5046
<<doc-values,`doc_values`>>::
5147

5248
Should the field be stored on disk in a column-stride fashion, so that it
@@ -95,6 +91,8 @@ include::keyword.asciidoc[tag=dimension]
9591
the <<mapping-source-field,`_source`>> field. Accepts `true` or `false`
9692
(default).
9793

94+
include::keyword.asciidoc[tag=dimension]
95+
9896
[[query-ip-fields]]
9997
==== Querying `ip` fields
10098

docs/reference/mapping/types/keyword.asciidoc

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,6 @@ include::numeric.asciidoc[tag=map-ids-as-keyword]
5454

5555
The following parameters are accepted by `keyword` fields:
5656

57-
[horizontal]
58-
59-
// tag::dimension[]
60-
`dimension`::
61-
For internal use by Elastic only. Marks the field as a time series dimension.
62-
Accepts `true` or `false` (default).
63-
+
64-
The <<index-mapping-dimension-fields-limit,`index.mapping.dimension_fields.limit`>>
65-
index setting limits the number of dimensions in an index.
66-
+
67-
Dimension fields have the following constraints:
68-
+
69-
* The `doc_values` and `index` mapping parameters must be `true`.
70-
* Field values cannot be an <<array,array or multi-value>>.
71-
// end::dimension[]
72-
* Field values cannot be larger than 1024 bytes.
73-
* The field cannot use a <<normalizer,`normalizer`>>.
74-
7557
<<doc-values,`doc_values`>>::
7658

7759
Should the field be stored on disk in a column-stride fashion, so that it
@@ -107,6 +89,10 @@ Dimension fields have the following constraints:
10789
Defaults to `docs` but can also be set to `freqs` to take term frequency into account
10890
when computing scores.
10991

92+
<<mapping-field-meta,`meta`>>::
93+
94+
Metadata about the field.
95+
11096
<<norms,`norms`>>::
11197

11298
Whether field-length should be taken into account when scoring queries.
@@ -161,9 +147,21 @@ Dimension fields have the following constraints:
161147
when building a query for this field.
162148
Accepts `true` or `false` (default).
163149

164-
<<mapping-field-meta,`meta`>>::
165-
166-
Metadata about the field.
150+
// tag::dimension[]
151+
`time_series_dimension`::
152+
(Optional, Boolean) For internal use by Elastic only. Marks the field as a time
153+
series dimension. Defaults to `false`.
154+
+
155+
The <<index-mapping-dimension-fields-limit,`index.mapping.dimension_fields.limit`>>
156+
index setting limits the number of dimensions in an index.
157+
+
158+
Dimension fields have the following constraints:
159+
+
160+
* The `doc_values` and `index` mapping parameters must be `true`.
161+
* Field values cannot be an <<array,array or multi-value>>.
162+
// end::dimension[]
163+
* Field values cannot be larger than 1024 bytes.
164+
* The field cannot use a <<normalizer,`normalizer`>>.
167165

168166
include::constant-keyword.asciidoc[]
169167

docs/reference/mapping/types/numeric.asciidoc

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,12 @@ the data as both a `keyword` _and_ a numeric data type.
111111

112112
The following parameters are accepted by numeric types:
113113

114-
[horizontal]
115-
116114
<<coerce,`coerce`>>::
117115

118116
Try to convert strings to numbers and truncate fractions for integers.
119117
Accepts `true` (default) and `false`. Not applicable for `unsigned_long`.
120118
Note that this cannot be set if the `script` parameter is used.
121119

122-
include::keyword.asciidoc[tag=dimension]
123-
+
124-
Of the numeric field types, only `byte`, `short`, `integer`, and `long` fields
125-
support this parameter.
126-
127120
<<doc-values,`doc_values`>>::
128121

129122
Should the field be stored on disk in a column-stride fashion, so that it
@@ -140,6 +133,10 @@ support this parameter.
140133

141134
Should the field be searchable? Accepts `true` (default) and `false`.
142135

136+
<<mapping-field-meta,`meta`>>::
137+
138+
Metadata about the field.
139+
143140
<<null-value,`null_value`>>::
144141

145142
Accepts a numeric value of the same `type` as the field which is
@@ -173,9 +170,25 @@ support this parameter.
173170
the <<mapping-source-field,`_source`>> field. Accepts `true` or `false`
174171
(default).
175172

176-
<<mapping-field-meta,`meta`>>::
177-
178-
Metadata about the field.
173+
include::keyword.asciidoc[tag=dimension]
174+
+
175+
Of the numeric field types, only `byte`, `short`, `integer`, `long`, and
176+
`unsigned_long` fields support this parameter.
177+
+
178+
A numeric field can't be both a time series dimension and a time series metric.
179+
180+
// tag::time_series_metric[]
181+
`time_series_metric`::
182+
(Optional, string) For internal use by Elastic only. Marks the field as a time
183+
series metric. The value is the metric type. Defaults to `null` (Not a time
184+
series metric).
185+
// end::time_series_metric[]
186+
+
187+
For numeric fields, this parameter accepts `gauge` and `counter`. You can't
188+
update this parameter for existing fields.
189+
+
190+
For a numeric time series metric, the `doc_values` parameter must be `true`. A
191+
numeric field can't be both a time series dimension and a time series metric.
179192

180193
[[scaled-float-params]]
181194
==== Parameters for `scaled_float`

0 commit comments

Comments
 (0)