-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Java High Level Rest Client cannot parse weighted_avg result #36861
Comments
The weighted avg had some issues which were fixed in 6.5.4: #36525 Could you try on the newer version and see if that fixes your issues? |
Pinging @elastic/es-analytics-geo |
Pinging @elastic/es-core-features |
I did run it on the latest 6.5.4 and still had the problem. I originally had this issue: #36525 and I started using the 6.5.4-SNAPSHOT builds a couple of days ago which fixed that issue but not the one I'm reporting here. Today I upgraded to the released 6.5.4 version and it still has a problem parsing the query result. I can take the generated JSON query that is being sent to ES and use curl/postman to verify that the query works and returns expected data but executing the query via the high level rest client produces the above exception when parsing the response. |
I created the following integration test to reproduce the issue: xpando@33f9eb7 Produced the same error:
Let me know if you'd prefer a PR for the integration test. Test run details:
|
Update: I fixed this issue in my fork and the integration test is passing. I'll submit a pull request shortly with the fix. |
Thanks for fixing this @xpando! Sorry for being absent, was off on holiday :) |
No worries! Glad I could help. |
Add integration test for weighted avg sub aggregation Add weighted avg parser to DefaultNamedXContents Fixes #36861
Elasticsearch version (
bin/elasticsearch --version
):"version" : {
"number" : "6.5.2",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "9434bed",
"build_date" : "2018-11-29T23:58:20.891072Z",
"build_snapshot" : false,
"lucene_version" : "7.5.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
}
High level rest client version from build.gradle:
compile group: 'org.elasticsearch', name: 'elasticsearch', version: '6.5.4'
compile group: 'org.elasticsearch.client', name: 'elasticsearch-rest-high-level-client', version: '6.5.4'
Plugins installed:
[]
JVM version (
java -version
):java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
OS version (
uname -a
if on a Unix-like system):Darwin dfindley-macbook.local 18.2.0 Darwin Kernel Version 18.2.0: Fri Oct 5 19:41:49 PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64 x86_64
Description of the problem including expected versus actual behavior:
Steps to reproduce:
The query is produced just fine and a correct response is returned from the ElasticSearch server but an exception is thrown on parsing the result. See log below.
Provide logs (if relevant):
The text was updated successfully, but these errors were encountered: