Search: Allow to execute search with no parameters, closes #1696.
This commit is contained in:
parent
86a6a5f021
commit
0729413341
|
@ -43,7 +43,6 @@ import java.io.IOException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|
||||||
import static org.elasticsearch.search.Scroll.readScroll;
|
import static org.elasticsearch.search.Scroll.readScroll;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -113,9 +112,10 @@ public class SearchRequest implements ActionRequest {
|
||||||
@Override
|
@Override
|
||||||
public ActionRequestValidationException validate() {
|
public ActionRequestValidationException validate() {
|
||||||
ActionRequestValidationException validationException = null;
|
ActionRequestValidationException validationException = null;
|
||||||
if (source == null && extraSource == null) {
|
// no need to check, we resolve to match all query
|
||||||
validationException = addValidationError("search source is missing", validationException);
|
// if (source == null && extraSource == null) {
|
||||||
}
|
// validationException = addValidationError("search source is missing", validationException);
|
||||||
|
// }
|
||||||
return validationException;
|
return validationException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue