Is SearchRequestBuilder.setExtraSource/setSource broken in 1.0.0.Beta2?

Hi, I was searching the internet trying to find the API to feed a JSON
query string directly into SearchRequestBuilder. Then I learned that the
setSource/setExtraSource should do the trick. I'm using 1.0.0.Beta2 and
this does not seem to be working.

My JSON string which works if I use it via Curl/Sense Chrome plugin is:
{ "query" : {"query_string":{"query":"*"}} }

The same string does not produce any results when I use:
SearchRequestBuilder builder =

SearchRequestBuilder.toString() produces an empty "{}" JSON string.

Everything works when I use the explicit
"builder.setQuery(QueryBuilders....)" methods. What am I doing wrong?


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
To view this discussion on the web visit
For more options, visit