I'm slowly learning the new Java Client API and I got good results. I'm now implementing some code where the use of the API is passing the JSON for the search request.
So far I cannot figure out how to pass this JSON to the java API.
But I get an exception: co.elastic.clients.elasticsearch._types.ElasticsearchException: [es/search] failed: [search_phase_execution_exception] all shards failed (without more details).
I've also tried the following with the same result:
Thanks @dadoonet yes, yes I know that the goal of the Java Client API is to provide a typed API!
And this is what I use already.
However, I also have the need to execute a search query in Java where the definition of this query is provided as a string (JSON content), dynamically and from a non-java language.
Is it possible to use the typed Java Client API to perform such a search by passing it a JSON string? Or do I need to use another Java API for that?
This cannot work for sure since it's not about the query string but about the query definition itself... Can't find any API though to pass a JSON value.
Is that low-level client supposed to continue being supported in the future or is it meant that the Java Client API will support this need in the future and I'll need to move my code to it when it becomes available and when the low-level client is removed?
I was really hoping to use the new java client API. Let's hope @swallez can provide some good news
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.