SearchRequest for JSON query

Hi,
I am using RestHighLevelClient for my project. I have JSON queries to be executed and get the response and parse them.
Earlier I was using low level RestClient.Get to get the response.
Please help me in doing the same with RestHighLevelClient.

Thanks

my java is a bit rusty but from the docs I read this

High level REST client that wraps an instance of the low level RestClient and allows to build requests and read responses

This would let me to believe you should be able to do the same calls as you would do with the low level client.

Full java doc here

Hi Pjanzen,
Thanks for the reply.
Sorry it was my bad. Earlier I was using transportclient to do get searchtemplateresponse.

SearchTemplateResponse response =
                new SearchTemplateRequestBuilder(transportClient)
            .setRequest(searchRequest)
            .setScript(query)
            .setScriptType(ScriptType.INLINE)
            .get();

Now I am looking for the way to do it by RestHighLevelClient, as transportclient will be removed in coming versions I suppose.

Thanks

Hi,
Can someone please confirm, whether it is even possible in elasticsearch 6.3.0 to replace transportclient with resthighlevelclient?

I need to conclude it soon.
Please help.

Not all the features are available but I'd say that the Rest Client is in a good shape.

Thanks @dadoonet,
So Either I have to wait for replacing transportclient, or I need to change the way my elasticsearchUI works.
I will see what can be done.

Thanks again.

Or use the Low Level client for what is not implemented yet. That's not hard to use IMO.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.