|
|
@@ -31,6 +31,7 @@ import org.elasticsearch.cluster.ClusterState;
|
|
|
import org.elasticsearch.cluster.routing.GroupShardsIterator;
|
|
|
import org.elasticsearch.common.inject.Inject;
|
|
|
import org.elasticsearch.common.settings.Settings;
|
|
|
+import org.elasticsearch.indices.IndexMissingException;
|
|
|
import org.elasticsearch.transport.BaseTransportRequestHandler;
|
|
|
import org.elasticsearch.transport.TransportChannel;
|
|
|
import org.elasticsearch.transport.TransportService;
|
|
|
@@ -82,6 +83,9 @@ public class TransportSearchAction extends BaseAction<SearchRequest, SearchRespo
|
|
|
// if we only have one group, then we always want Q_A_F, no need for DFS, and no need to do THEN since we hit one shard
|
|
|
searchRequest.searchType(QUERY_AND_FETCH);
|
|
|
}
|
|
|
+ } catch (IndexMissingException e) {
|
|
|
+ // ignore this, we will notify the search response if its really the case
|
|
|
+ // from the actual action
|
|
|
} catch (Exception e) {
|
|
|
logger.debug("failed to optimize search type, continue as normal", e);
|
|
|
}
|