-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TSDB] Metric fields in the field caps API #88695
Conversation
in field caps api
Hi @csoulios, I've created a changelog YAML for you. |
Pinging @elastic/es-analytics-geo (Team:Analytics) |
@@ -80,44 +83,47 @@ public void assertSmallSimple(Object d1, Object d2, CheckedConsumer<XContentBuil | |||
dimensionMapping.accept(mapping); | |||
mapping.field("time_series_dimension", true); | |||
mapping.endObject(); | |||
}); | |||
// Add a keyword dimension as a routing parameter | |||
mapping.startObject("k").field("type", "keyword").field("time_series_dimension", true).endObject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a keyword
dimension field named k
, simply because there always must be a routing dimension. It's value is always k
@@ -137,11 +137,11 @@ field types are all described as the `keyword` type family. | |||
|
|||
`time_series_dimension`:: | |||
preview:[] | |||
Whether this field is used as a time series dimension. | |||
Whether this field is used as a time series dimension on all indices. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kilfoyle Maybe you have a better take on the doc changes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Very comprehensive tests for such a small functional change!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on my side.
Co-authored-by: David Kilfoyle <[email protected]>
Co-authored-by: David Kilfoyle <[email protected]>
Co-authored-by: David Kilfoyle <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good for the text changes!
Thanks everyone for reviewing this so fast! |
#89171 (comment) relates to this PR. |
To assist the user in configuring the visualizations correctly while leveraging TSDB functionality, information about TSDB configuration should be exposed via the field caps API per field.
Especially for metrics fields, it must be clear which fields are metrics and if they belong to only time-series indexes or mixed time-series and non-time-series indexes.
To further distinguish metric fields when they belong to any of the following indices:
This PR modifies the field caps API so that the mapping parameters
time_series_dimension
andtime_series_dimension
are presented only when they are set on fields of time-series indexes. Thoseparameters are completely ignored when they are set on standard (non-time-series) indexes.
This PR revisits some of the conventions adopted by #78790