Preference.PRIMARY_FIRST would mean that traffic would be routed to replicas only when primaries are not available to serve the request. So, in case of a node failure and in the interim when the replica is being promoted to primary - the search request would be served by the replica instead of getting failed in case of Preference.PRIMARY.
Currently the search preference for searchable snapshots is set to
_primary
, ref: https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/cluster/routing/OperationRouting.java#L245.Preference.PRIMARY_FIRST
would mean that traffic would be routed to replicas only when primaries are not available to serve the request. So, in case of a node failure and in the interim when the replica is being promoted to primary - the search request would be served by the replica instead of getting failed in case ofPreference.PRIMARY
.A similar approach is also followed for tiered remote index via https://github.com/opensearch-project/OpenSearch/pull/14934