Created
December 19, 2016 19:46
-
-
Save shawnjohnson/cdaa1290f744c4b55ff5cc4ef33da16d to your computer and use it in GitHub Desktop.
Refactor return to allow for logging of complete query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private SearchResponse doSearch(SearchRequestBuilder searchRequest, SearchQuery searchQuery) { | |
... | |
if(searchQuery.getQuery() != null) { | |
searchRequest.setQuery(searchQuery.getQuery()); | |
} | |
// Print full query before sending | |
if(logger.isDebugEnabled()) { | |
logger.debug("doSearch searchRequest:\n"+ searchRequest.toString()); | |
} | |
return getSearchResponse(searchRequest.execute()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment