Skip to content

Commit b93abf3

Browse files
committed
Document that awareness attributes override custom preferences
When selecting replicas in a search, the coordinating node prefers nodes with the same shard allocation awareness attributes. So even if a search specifies the same custom preference values, different coordinating nodes may route it differently because of their awareness attributes. In 8.0, allocation awareness attributes no longer influence search replica selection. So although this is a bug, we do not intend to fix it in 7.x or 6.x. Instead, we document the behavior as a 'warning' and mention a system property that can be used to disable the behavior. Addresses #53054.
1 parent 5c6564f commit b93abf3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/reference/search/request/preference.asciidoc

+6
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ and on a changing index this may mean that repeated searches may yield
115115
different results if they are executed on different shard copies which are in
116116
different refresh states.
117117

118+
WARNING: If a node has <<allocation-awareness,shard allocation awareness>>
119+
attributes, then it will prefer shards with the same awareness attribute values.
120+
Because of these attributes, different coordinating nodes may route the same
121+
search differently, even if the searches use the same custom `preference` values.
122+
In recent {es} versions, awareness attributes no longer influence search routing.
123+
118124
WARNING: The `_primary`, `_primary_first`, `_replica` and `_replica_first` are
119125
deprecated as their use is not recommended. They do not help to avoid
120126
inconsistent results that arise from the use of shards that have different

0 commit comments

Comments
 (0)