You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elasticsearch version (bin/elasticsearch --version):
6.4.2
Plugins installed: []
JVM version (java -version):
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
OS version (uname -a if on a Unix-like system):
Linux 4.18.0-2-amd64 #1 SMP Debian 4.18.10-2 (2018-10-07) x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
When trying to filter the values for which buckets are created when using terms aggregation on a long field, it's not possible to use values larger than 53 bits. When specifying one in a list of include values, no bucket is created most of the time, and when specifying one in a list of exclude values, the respective bucket is not excluded. I expect that for fields of the long type, the full 64 bit range works.
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.
PUT /test '{"mappings":{"_doc":{"properties":{"field1":{"type":"long"}}}}}'
POST /test/_doc '{"field1":0}'
POST /test/_doc '{"field1":123456}'
POST /test/_doc '{"field1":4094779560956318341}'
POST /test/_doc/_search '{"size":0,"aggs":{"by_field1":{"terms":{"field":"field1","include":[0,123456,4094779560956318341]}}}} returns only buckets for 0 and 123456
POST /test/_doc/_search '{"size":0,"aggs":{"by_field1":{"terms":{"field":"field1","exclude":[0,123456,4094779560956318341]}}}} returns only bucket for 4094779560956318341
Elasticsearch version (
bin/elasticsearch --version
):6.4.2
Plugins installed: []
JVM version (
java -version
):OS version (
uname -a
if on a Unix-like system):Description of the problem including expected versus actual behavior:
When trying to filter the values for which buckets are created when using terms aggregation on a long field, it's not possible to use values larger than 53 bits. When specifying one in a list of include values, no bucket is created most of the time, and when specifying one in a list of exclude values, the respective bucket is not excluded. I expect that for fields of the long type, the full 64 bit range works.
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.
PUT /test '{"mappings":{"_doc":{"properties":{"field1":{"type":"long"}}}}}'
POST /test/_doc '{"field1":0}'
POST /test/_doc '{"field1":123456}'
POST /test/_doc '{"field1":4094779560956318341}'
POST /test/_doc/_search '{"size":0,"aggs":{"by_field1":{"terms":{"field":"field1","include":[0,123456,4094779560956318341]}}}}
returns only buckets for 0 and 123456POST /test/_doc/_search '{"size":0,"aggs":{"by_field1":{"terms":{"field":"field1","exclude":[0,123456,4094779560956318341]}}}}
returns only bucket for 4094779560956318341Provide logs (if relevant):
The reason is apparently here:
https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/IncludeExclude.java#L633-L642
and here:
https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/search/DocValueFormat.java#L118-L126
The text was updated successfully, but these errors were encountered: