Description
Elasticsearch version (bin/elasticsearch --version
): 7.11.0 - 7.16.3
Plugins installed: [Netty4Plugin.class, PainlessPlugin.class, CommonAnalysisPlugin.class, ParentJoinPlugin.class]
JVM version (java -version
): 11.0.13
OS version (uname -a
if on a Unix-like system):Darwin Kernel Version 21.2.0 and on windows 10
Description of the problem including expected versus actual behavior:
During the upgrade from 7.10.2 to 7.16.3 I encounter the issue with date histogram aggregation for the arrays field. Aggregated buckets are displayed after query, but if I select one then the rest are gone.
To explaining behavioral I will based on document with array field "date":["2021-05-01","2021-04-01"]
.
I expect that when I made a query with date aggregation by month and on date
field for that document then I got, as a result, two buckets: 2021-05
and 2021-04
. Which is working as expected. The issue here is when I select one of the buckets as a filter then as result I didn't got the second bucket. This is unexpected because the given document matches also the second filter. In version <=7.10.2
it's working as expected.
Current behavioral break facet approach in search driven application. It is intended behavior or a bug?
Steps to reproduce:
- Create doc
POST test/_doc
{
"date":["2021-05-01","2021-04-01","2021-04-22"]
}
- Make a search request with filter (doesn't work in 7.16.3, but works in 7.10.2)
GET test/_search?q=date:2021-04-01
{
"aggs": {
"NAME": {
"date_histogram": {
"field": "date",
"interval": "1M"
}
}
}
}
- Make a search request with range filter (work, but is a kinda workaround)
GET test/_search?q=date:[2021-04-01 TO 2021-08-01]
{
"aggs": {
"NAME": {
"date_histogram": {
"field": "date",
"interval": "1M"
}
}
}
}
I checked for other types, an issue occurs only for date
type.