-
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
composite
agg fails to bucket date_nanos
with date_histogram
source
#53168
Labels
Comments
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
6 tasks
This is what you get with a non-nanos-date:
Which, I think, is pretty much what you should expect from a nanos date. I'll see if I can make it do that. |
nik9000
added a commit
to nik9000/elasticsearch
that referenced
this issue
Mar 9, 2020
It looks like `date_nanos` fields weren't likely to work properly in composite aggs because composites iterate field values using points and we weren't converting the points into milliseconds. Because the doc values were coming back in milliseconds we ended up geting very confused and just never collecting sub-aggregations. This fixes that by adding a method to `DateFieldMapper.Resolution` to `parsePointAsMillis` which is similarly in name and function to `NumberFieldMapper.NumberType`'s `parsePoint` except that it normalizes to milliseconds which is what aggs need at the moment. Closes elastic#53168
nik9000
added a commit
that referenced
this issue
Mar 10, 2020
It looks like `date_nanos` fields weren't likely to work properly in composite aggs because composites iterate field values using points and we weren't converting the points into milliseconds. Because the doc values were coming back in milliseconds we ended up geting very confused and just never collecting sub-aggregations. This fixes that by adding a method to `DateFieldMapper.Resolution` to `parsePointAsMillis` which is similarly in name and function to `NumberFieldMapper.NumberType`'s `parsePoint` except that it normalizes to milliseconds which is what aggs need at the moment. Closes #53168
nik9000
added a commit
to nik9000/elasticsearch
that referenced
this issue
Mar 10, 2020
It looks like `date_nanos` fields weren't likely to work properly in composite aggs because composites iterate field values using points and we weren't converting the points into milliseconds. Because the doc values were coming back in milliseconds we ended up geting very confused and just never collecting sub-aggregations. This fixes that by adding a method to `DateFieldMapper.Resolution` to `parsePointAsMillis` which is similarly in name and function to `NumberFieldMapper.NumberType`'s `parsePoint` except that it normalizes to milliseconds which is what aggs need at the moment. Closes elastic#53168
nik9000
added a commit
that referenced
this issue
Mar 11, 2020
It looks like `date_nanos` fields weren't likely to work properly in composite aggs because composites iterate field values using points and we weren't converting the points into milliseconds. Because the doc values were coming back in milliseconds we ended up geting very confused and just never collecting sub-aggregations. This fixes that by adding a method to `DateFieldMapper.Resolution` to `parsePointAsMillis` which is similarly in name and function to `NumberFieldMapper.NumberType`'s `parsePoint` except that it normalizes to milliseconds which is what aggs need at the moment. Closes #53168
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This bug is present in at least 7.6. Probably earlier.
composite
agg does not behave the same asdate_histogram
on adate_nanos
field.Example:
Lets build a
date_nanos
index with some docsA good call from a
date_histogram
agg:Returns:
But, the following composite agg does not return the same thing:
There are instead strange
null
values and bucket keysThe text was updated successfully, but these errors were encountered: