Skip to content

Commit cdbfcb5

Browse files
committed
don't log index missing exception when trying to optimize single shard search request
1 parent 36c7de9 commit cdbfcb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/action/search/TransportSearchAction.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.elasticsearch.cluster.routing.GroupShardsIterator;
3232
import org.elasticsearch.common.inject.Inject;
3333
import org.elasticsearch.common.settings.Settings;
34+
import org.elasticsearch.indices.IndexMissingException;
3435
import org.elasticsearch.transport.BaseTransportRequestHandler;
3536
import org.elasticsearch.transport.TransportChannel;
3637
import org.elasticsearch.transport.TransportService;
@@ -82,6 +83,9 @@ public class TransportSearchAction extends BaseAction<SearchRequest, SearchRespo
8283
// 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
8384
searchRequest.searchType(QUERY_AND_FETCH);
8485
}
86+
} catch (IndexMissingException e) {
87+
// ignore this, we will notify the search response if its really the case
88+
// from the actual action
8589
} catch (Exception e) {
8690
logger.debug("failed to optimize search type, continue as normal", e);
8791
}

0 commit comments

Comments
 (0)