Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions docs/basic-config.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
7 changes: 0 additions & 7 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@ export interface NodeOptions {
ssl?: TlsConnectionOptions
/** @property headers Custom HTTP headers that should be sent with each request */
headers?: Record<string, any>
/** @property roles Common Elasticsearch roles that can be assigned to this node. Can be helpful when writing custom nodeFilter or nodeSelector functions. */
roles?: {
master: boolean
data: boolean
ingest: boolean
ml: boolean
}
}

export interface ClientOptions {
Expand Down