From 07294133415cd9297fe3effa8ca0c5f0b9d29918 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Sun, 12 Feb 2012 16:58:45 +0200 Subject: [PATCH] Search: Allow to execute search with no parameters, closes #1696. --- .../org/elasticsearch/action/search/SearchRequest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/elasticsearch/action/search/SearchRequest.java b/src/main/java/org/elasticsearch/action/search/SearchRequest.java index c441da51a92..7e276ceedc7 100644 --- a/src/main/java/org/elasticsearch/action/search/SearchRequest.java +++ b/src/main/java/org/elasticsearch/action/search/SearchRequest.java @@ -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; }