I think you can print a QueryBuilder or a SearchRequestBuilder but not a SearchRequest.
QueryBuilder qb = QueryBuilders.queryString("my text");
logger.info("Your query is : {}", qb);
// this works as well
node.client().prepareSearch().setQuery(qb).toString();
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 4 mars 2014 à 17:45:56, Tebring Daly (tdalytx@gmail.com) a écrit:
On a toString() I get the typical unimplemented toString class reference : "org.elasticsearch.action.search.SearchRequest@142daa2e"
I am using elasticsearch 1.0.0, wonder if something has changed from 0.90 or 1.0.1?
Thanks for the response
On Monday, March 3, 2014 8:46:25 PM UTC-6, amit.soni wrote:
If you mean in Java, toString() gives me the json representation.
-Amit.
On Mon, Mar 3, 2014 at 4:30 PM, Tebring Daly tda...@gmail.com wrote:
Is there a way to get the json string from a SearchRequest object?
--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/30e07de8-ed0c-49c9-a163-aaa11f20c9a4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
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/61c3c936-08bd-423d-8a44-f26d08477dd1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
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/etPan.53160504.2ae8944a.7701%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/groups/opt_out.