LOG.trace().log("Performing a search query: [Query: ", searchRequest.getQuery(), ", Index: ",
searchRequest.getIndex(), ", NumResults: ", searchRequest.getNumResults(), "]");
RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.GET, url);
requestBuilder.setCallback(new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
LOG.trace().log("Search response received: ", response.getText());
if (response.getStatusCode() != Response.SC_OK) {
callback.onFailure("Got back status code " + response.getStatusCode());