Json string to searchresponse conversion

(Rahul Sharma) #1

Hi, I am looking for ways to convert json string from ES to searchresponse object.

Thanks for your help in advance.

(Mark Walkom) #2

What is a searchresponse object?

(Rahul Sharma) #3

SearchResponse is object which we get after executing a query, I am written a plugin. I am calling the plugin using http client code. Please let me know if there is a way to get back searchresponse object from json string.

(David Pilato) #4

If you are writing a Java Plugin, you should not worry about JSON and just use Java Objects.

Can you describe a bit more what you are doing and what is your workflow?

(Rahul Sharma) #5

I have registered a handle for controller, and using the http requests to get to the handle request section. I am trying to add social ranking to the returned scores from ES. after Rescoring I am sending the results back to the client, there I need to convert the json string to SearchResponse.

I could not implement transport client as my plugin code is server side.

(Rahul Sharma) #6

Well we have decided on consuming data in json object.

(system) #7