Strange behavior with date histogram aggregation in a field that is inside a nested object (Elasticsearch 7.10.0)

Hi!
I'm in the middle of an upgrade process to the 7.10.0 Elasticsearch (changing the client from TransportClient to JavaRestHighLevelClient also) and I've noticed a strange behavior of Date Histogram Aggregation when it is inside a Nested Aggregation.
I have two Junits tests that cover, each, the scenarios inside a nested and not.

Without the nested, with a interval of 1d, it works as expected:

But when I run the test that makes the date histogram (and its target field) inside a Nested, things get a little messy:

What could possibly be the problem?

Though I have no impression that this would be at fault, it may be worth trying fixed_interval or calendar_interval as a sanity check since interval is deprecated. I can't imagine that would cause this though ¯\_(ツ)_/¯

@egalpin, it makes no difference (I've tried with both, fixed and calendar interval).

Nobody? Should I fill a bug, instead?

Have you examined the generated query? I assumed so from your screenshots but just a sanity check to verify that the JSON query produced by the new client matches the old client's query. I personally don't know how the results could occur given the input interval, but very curious to know the answer too.

@egalpin, I suppose it has something to do with my data (although I have no idea why this is happening).
I've checked the requests and they look ok. After that, I took the relevant requests (since the index creation to the search) and created a Dockerfile to simulate the problem. When I did that (with an empty container), the problem didn't occur.
So, I can only imagine this is because some data my Elasticsearch has that an empty container wouldn't have.
But, again, it makes no sense to me at all.

I finally managed to reproduce it. In 7.9.3 the problem isn't reproducible. Only in 7.10.0.

I've filled a bug about this.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.