Search: Allow to execute search with no parameters, closes #1696.

This commit is contained in:
Shay Banon 2012-02-12 16:58:45 +02:00
parent 86a6a5f021
commit 0729413341
1 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,6 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.Map;
import static org.elasticsearch.action.ValidateActions.addValidationError;
import static org.elasticsearch.search.Scroll.readScroll;
/**
@ -113,9 +112,10 @@ public class SearchRequest implements ActionRequest {
@Override
public ActionRequestValidationException validate() {
ActionRequestValidationException validationException = null;
if (source == null && extraSource == null) {
validationException = addValidationError("search source is missing", validationException);
}
// no need to check, we resolve to match all query
// if (source == null && extraSource == null) {
// validationException = addValidationError("search source is missing", validationException);
// }
return validationException;
}