when no specific internal source builder is constructed, don't set it, so setting raw source will not get override

This commit is contained in:
Shay Banon 2012-01-31 19:37:05 +02:00
parent d4b6753d93
commit 211176d10e
1 changed files with 3 additions and 1 deletions

View File

@ -716,7 +716,9 @@ public class SearchRequestBuilder extends BaseRequestBuilder<SearchRequest, Sear
@Override
protected void doExecute(ActionListener<SearchResponse> listener) {
request.source(sourceBuilder());
if (sourceBuilder != null) {
request.source(sourceBuilder());
}
client.search(request, listener);
}