I was setting parameters for requests and I was expecting to have a parameter local as preference.
I noticed it was removed in 2.0 so I looked at the code and if I understand correctly
An AnalyzeRequest is sent to a node.
If an index was specified, then it is sent to a random node (that must have a shard of the index)
Else it is sent to the local node
Why not have the possibility to send it to the local node as a preference
I ask this because when I typed it, I ended up on a "preferLocal" option that was present in ES 1.7
For the equivalent code (TransportSingleCustomOperationAction.AsyncSingleAction:performFirst)
If no index specified, it executes on the local node as newer versions
if preferLocalShard, then it executes it on the local node (with a shard of the index)
Else or if local node is a not appropriate, it is similar to newer versions
The comment of the method even specifies: "First get should try and use a shard that exists on a local node for better performance"
So I was wondering why it was removed in ES 2.0