don't log index missing exception when trying to optimize single shard search request

This commit is contained in:
kimchy 2011-01-25 18:29:28 +02:00
parent 00aad4c123
commit 10ff150bb8
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}