Skip to content

Conversation

@nik9000
Copy link
Member

@nik9000 nik9000 commented 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

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 nik9000 merged commit 9ada508 into elastic:7.x Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant