Drop broken support for roles (#2674) (#2675)

(cherry picked from commit e502d2f17a)

Co-authored-by: Josh Mock <joshua.mock@elastic.co>
This commit is contained in:
github-actions[bot]
2025-03-21 14:26:24 -05:00
committed by GitHub
parent 177a420521
commit 75f31d974d
2 changed files with 2 additions and 17 deletions

View File

@ -167,19 +167,11 @@ const client = new Client({
----
|`nodeFilter`
a|`function` - Filters which node not to use for a request. +
a|`function` - Takes a `Connection` and returns `true` if it can be sent a request, otherwise `false`. +
_Default:_
[source,js]
----
function defaultNodeFilter (node) {
// avoid master only nodes
if (node.roles.master === true &&
node.roles.data === false &&
node.roles.ingest === false) {
return false
}
return true
}
() => true
----
|`nodeSelector`