-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Bucket_scripts about nested.field will lead Java elasticsearch exception in Some situations #26376
Comments
this issue is some like https://github.com/elastic/elasticsearch/issues/25845 |
Other Test cases of help:
|
If replaced the empty-filter-aggregation with a meaningless-terms-aggregation, it also works:
|
If removed the bucket-script aggregation, it also works as expected:
|
This actually has nothing to do with the the nested field. The reason your first example above fails is because the If you use the |
@colings86 thanks a lot, it help me a lot |
Elasticsearch version:
"number": "5.3.1",
"build_hash": "5f9cf58",
"build_date": "2017-04-17T15:52:53.846Z",
"build_snapshot": false,
"lucene_version": "6.4.2"
JVM version (
java -version
):java version "1.8.0_45"
OS version :
Ubuntu 14.04.5 LTS
Linux 3.19.0-26-generic #28~14.04.1-Ubuntu SMP
Steps to reproduce:
cc-gossip-test-2017.08.24 is a time-series index with nested path: snmp.ifXTableStats and snmp.ifXTableStats
snmp.ifXTableStats.ifHCInPkts is a nested field and in long data_type
Bucket_scripts about nested.field will lead Java elasticsearch exception in Some situations:
Provide logs (if relevant):
[2017-08-25T10:01:53,169][DEBUG][o.e.a.s.TransportSearchAction] [AmO7Hox] failed to reduce search
org.elasticsearch.action.search.ReduceSearchPhaseException: [reduce]
at org.elasticsearch.action.search.AbstractSearchAsyncAction$2.onFailure(AbstractSearchAsyncAction.java:548) [elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.onFailure(ThreadContext.java:623) [elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39) [elasticsearch-5.3.1.jar:5.3.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
Caused by: java.lang.ClassCastException: org.elasticsearch.search.aggregations.bucket.filter.InternalFilter cannot be cast to org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
at org.elasticsearch.search.aggregations.pipeline.bucketscript.BucketScriptPipelineAggregator.reduce(BucketScriptPipelineAggregator.java:92) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.search.aggregations.InternalAggregation.reduce(InternalAggregation.java:109) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:158) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.search.aggregations.bucket.InternalSingleBucketAggregation.doReduce(InternalSingleBucketAggregation.java:106) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.search.aggregations.InternalAggregation.reduce(InternalAggregation.java:107) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:158) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.action.search.SearchPhaseController.merge(SearchPhaseController.java:518) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.action.search.AbstractSearchAsyncAction$2.doRun(AbstractSearchAsyncAction.java:539) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638) ~[elasticsearch-5.3.1.jar:5.3.1]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-5.3.1.jar:5.3.1]
... 3 more
The text was updated successfully, but these errors were encountered: