JSON Response Schema

Hi there,

is there a JSON schema for the search-API response?

If not, isn't there some template which is used to build the various
clients? Unfortunately, I can't remember the details and where I found this
information.

As last resort, what approach would you recommend for Java-Dummies? Where
would be the starting point to follow the Java classes which are serialised
to the JSON-reponse on github?

Cheers,

Jan

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fd0933c9-62d7-4d26-92bd-61119f0e216b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I don’t think so.

Reading your post, I think you are basically looking for a Java client which can do Java Bean serialization / deserialization as you could have with Hibernate or similar.
Actually, using Jackson is super easy to serialize your beans in JSON and vice-versa. Look here for example: https://github.com/dadoonet/legacy-search/blob/01-direct/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java#L45 https://github.com/dadoonet/legacy-search/blob/01-direct/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java#L45

Deserializing is like this: https://github.com/elasticsearchfr/hands-on/blob/master/src/test/java/org/elasticsearchfr/handson/beans/BeerHelper.java#L57-63 https://github.com/elasticsearchfr/hands-on/blob/master/src/test/java/org/elasticsearchfr/handson/beans/BeerHelper.java#L57-63

You could also have a look at Spring Data project if you are using Spring. I believe this the kind of thing they provide: Spring Data Elasticsearch http://docs.spring.io/spring-data/elasticsearch/docs/1.1.0.M1/reference//html/

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 29 nov. 2014 à 09:06, knacktus@googlemail.com a écrit :

Hi there,

is there a JSON schema for the search-API response?

If not, isn't there some template which is used to build the various clients? Unfortunately, I can't remember the details and where I found this information.

As last resort, what approach would you recommend for Java-Dummies? Where would be the starting point to follow the Java classes which are serialised to the JSON-reponse on github?

Cheers,

Jan

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com mailto:elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fd0933c9-62d7-4d26-92bd-61119f0e216b%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/fd0933c9-62d7-4d26-92bd-61119f0e216b%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/C7A78954-5DA7-4C9B-8F18-1DFFA5E53C66%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.