We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
8.13.2
OpenJDK Runtime Environment Temurin-21.0.2+13
8.6.2
Hello,
it seems like the fromJson method on the Aggregation and Query objects work differently and the Builders returned work a bit different.
In our test setup we are using a function like this to create a query fixture from a supplied json which works fine:
public static Query createQueryFromFile(String fileContent) { return Query.of(q1 -> q1.withJson(new StringReader(fileContent))); }
However doing the same for aggregations results in a type error:
public static Aggregation createAggregationFromFile(String fileContent) { return Aggregation.of(agg1 -> agg1.withJson(new StringReader(fileContent))); }
Bad return type in lambda expression: Builder cannot be converted to ObjectBuilder
So it seems the interface is different although to me as a consumer they should work in a similar way?
The text was updated successfully, but these errors were encountered:
Hello, thank you for reporting this! Yes in theory it should work the same, we'll investigate on this.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Java API client version
8.13.2
Java version
OpenJDK Runtime Environment Temurin-21.0.2+13
Elasticsearch Version
8.6.2
Problem description
Hello,
it seems like the fromJson method on the Aggregation and Query objects work differently and the Builders returned work a bit different.
In our test setup we are using a function like this to create a query fixture from a supplied json which works fine:
However doing the same for aggregations results in a type error:
Bad return type in lambda expression: Builder cannot be converted to ObjectBuilder
So it seems the interface is different although to me as a consumer they should work in a similar way?
The text was updated successfully, but these errors were encountered: