diff --git a/src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/action/get/TransportGetLRONConfigAction.kt b/src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/action/get/TransportGetLRONConfigAction.kt index 6c43d93a6..25c2a42a8 100644 --- a/src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/action/get/TransportGetLRONConfigAction.kt +++ b/src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/action/get/TransportGetLRONConfigAction.kt @@ -13,6 +13,7 @@ import org.opensearch.action.search.SearchResponse import org.opensearch.action.support.ActionFilters import org.opensearch.action.support.HandledTransportAction import org.opensearch.client.node.NodeClient +import org.opensearch.cluster.routing.Preference import org.opensearch.common.inject.Inject import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.common.xcontent.XContentHelper @@ -93,6 +94,7 @@ class TransportGetLRONConfigAction @Inject constructor( val searchRequest = SearchRequest() .source(searchSourceBuilder) .indices(IndexManagementPlugin.CONTROL_CENTER_INDEX) + .preference(Preference.PRIMARY_FIRST.type()) client.search( searchRequest,