-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
[DOCS] Clarify supported rollup fields #70045
[DOCS] Clarify supported rollup fields #70045
Conversation
<<number,Numeric>>, <<date,`date`>>, or <<date_nanos,`date_nanos`>> field to | ||
collect metrics for. `unsigned_long` fields are not supported. |
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.
There seems to be a minor bug with date_nanos
fields. Here's reproduction steps:
// Map a date_nanos field.
PUT my-index-000001
{
"mappings": {
"properties": {
"my-date-nanos-field": {
"type": "date_nanos"
}
}
}
}
// Index a document with the date_nanos field.
POST my-index-000001/_doc
{
"@timestamp": "2099-11-15T13:12:00",
"my-date-nanos-field": "2015-01-01T12:10:30.123456789Z"
}
// Attempt to roll up the index with the date_nanos field as a metric.
POST my-index-000001/_rollup/rollup-my-index-000001
{
"groups": {
"date_histogram": {
"field": "@timestamp",
"calendar_interval": "1d"
}
},
"metrics": [
{
"field": "my-date-nanos-field",
"metrics": [
"min",
"max"
]
}
]
}
The rollup attempt returns an error:
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "trying to convert a known date time formatter to a nanosecond one, wrong field used?"
}
],
"type" : "exception",
"reason" : "Unable to rollup index [my-index-000001]",
"caused_by" : {
"type" : "exception",
"reason" : "[my-index-000001/9DveCFw8RR67S2tul3Qt_w][[my-index-000001][0]] org.elasticsearch.action.support.broadcast.BroadcastShardOperationFailedException:",
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "trying to convert a known date time formatter to a nanosecond one, wrong field used?"
}
}
},
"status" : 500
}
This seems to be the case even if an epoch_millis
format is used.
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.
^^ @talevy
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.
I will take a look. thank you!
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.
I opened #70161
Pinging @elastic/es-analytics-geo (Team:Analytics) |
Pinging @elastic/es-docs (Team:Docs) |
** A <<date,`date`>> or <<date_nanos,`date_nanos`>> timestamp field | ||
** One or more <<number,numeric>> fields | ||
** A <<date,`date`>> or <<date_nanos,`date_nanos`>> timestamp field. | ||
** At least one <<number,numeric>>, `date`, or `date_nanos` field other than the |
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.
should we highlight what this additional field would be used for? as in, why it is required: metrics.
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.
Thanks for the suggestion. Added with 983eb07
<<number,Numeric>>, <<date,`date`>>, or <<date_nanos,`date_nanos`>> field to | ||
collect metrics for. `unsigned_long` fields are not supported. |
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.
I will take a look. thank you!
<<number,Numeric>>, <<date,`date`>>, or <<date_nanos,`date_nanos`>> field to | ||
collect metrics for. `unsigned_long` fields are not supported. |
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.
I opened #70161
1 similar comment
Thanks for the heads up @jrodewig ! The added information with respect to the required "metric" field is very useful! |
Notes that in a rollup config:
terms
supporttext
fields withfielddata
enabled.metrics
supportdate
anddate_nanos
fields.unsigned_long
fields are not supported.Relates to #69582
CC @jloleysens. This may impact field type validation for the potential rollup UI.
Preview
https://elasticsearch_70045.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/rollup-api.html