I'm querying elasticsearch through its rest interface and getting a
json result. I wonder if there is a common way to map returning json
string into SearchResponse object which is available in Java API.
I'm querying elasticsearch through its rest interface and getting a
json result. I wonder if there is a common way to map returning json
string into SearchResponse object which is available in Java API.
Decision of using REST is made a little time ago. It's part of a large
project and I'm doing some research about mapping options. I just
wondered if there is a way to use Java API domain objects like
SearchResponse for mapping the response json since it already has the
structure that we need.
On Tue, Jul 31, 2012 at 3:29 PM, David Pilato david@pilato.fr wrote:
I don't understand.
Why don't you use Search Java API directly ?
I'm querying elasticsearch through its rest interface and getting a
json result. I wonder if there is a common way to map returning json
string into SearchResponse object which is available in Java API.
We are working on a rest client based on Java. It has it's own API and also
it has a bridge that can be plugged to native Java API, so you can use it
as is over a rest endpoint.
BUT it is not ready for production though give us some weeks it will be
alpha
Checkout source code you will find some tricks about your question.
On Tuesday, July 31, 2012 4:09:24 PM UTC+3, Aykut Uysal wrote:
Decision of using REST is made a little time ago. It's part of a large
project and I'm doing some research about mapping options. I just
wondered if there is a way to use Java API domain objects like
SearchResponse for mapping the response json since it already has the
structure that we need.
On Tue, Jul 31, 2012 at 3:29 PM, David Pilato <da...@pilato.fr<javascript:>>
wrote:
I don't understand.
Why don't you use Search Java API directly ?
Le 31 juil. 2012 à 12:47, Aykut Uysal <aykut...@gmail.com <javascript:>>
a écrit :
Hello all,
I'm querying elasticsearch through its rest interface and getting a
json result. I wonder if there is a common way to map returning json
string into SearchResponse object which is available in Java API.
I've found SearchResponse.readFromResponse() and readFrom() methods.
So far I couldn't make them work and while doing some research I've
also found kimchy saying 'There is no way to parse a json to a
SearchResponse' in this thread :
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.