Skip to content

Commit 690e737

Browse files
author
spalger
committed
[apis] regenerate
1 parent e1e7a79 commit 690e737

File tree

10 files changed

+13536
-768
lines changed

10 files changed

+13536
-768
lines changed

docs/api_methods.asciidoc

Lines changed: 245 additions & 189 deletions
Large diffs are not rendered by default.

docs/api_methods_6_5.asciidoc renamed to docs/api_methods_6_4.asciidoc

Lines changed: 313 additions & 369 deletions
Large diffs are not rendered by default.

docs/api_methods_6_6.asciidoc

Lines changed: 5302 additions & 0 deletions
Large diffs are not rendered by default.

docs/configuration.asciidoc

Lines changed: 29 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ WARNING: Due to the complex nature of the configuration, the config object you p
1515

1616
[[config-options]]
1717
=== Config options
18-
19-
*`host or hosts`*[[config-hosts]]::
18+
[horizontal]
19+
`host or hosts`[[config-hosts]]::
2020
`String, String[], Object[]` -- Specify the hosts that this client will connect to. If sniffing is enabled, or you call `client.sniff()`, this list will be used as seeds to discover the rest of your cluster.
2121
+
2222
The value(s) are passed to the <<host-reference,`Host`>> constructor. `Host` objects can help enforce path-prefixes, default headers and query strings, and can be helpful in making more intelligent selection algorithms; Head over to <<host-reference,the `Host` docs>> for more information.
@@ -29,10 +29,10 @@ Default:::
2929
------
3030

3131

32-
*`httpAuth`*[[config-http-auth]]:: `String` -- Specifies the default http auth as a String with username and password separated by a colon (eg. `user:pass`). Applies to any host defined in the original config, and any hosts discovered while sniffing.
32+
`httpAuth`[[config-http-auth]]:: `String` -- Specifies the default http auth as a String with username and password separated by a colon (eg. `user:pass`). Applies to any host defined in the original config, and any hosts discovered while sniffing.
3333

3434

35-
*`log`*[[config-log]]:: `String, String[], Object, Object[], Constructor` -- Unless a constructor is specified, this sets the output settings for the bundled logger. See the section on configuring-logging[logging] for more information.
35+
`log`[[config-log]]:: `String, String[], Object, Object[], Constructor` -- Unless a constructor is specified, this sets the output settings for the bundled logger. See the section on configuring-logging[logging] for more information.
3636

3737
Default in Node:::
3838
+
@@ -48,13 +48,14 @@ Default in Node:::
4848

4949

5050

51-
*`apiVersion`*[[config-api-version]]:: `String` -- Change the API that they client provides, specify the major version of the Elasticsearch nodes you will be connecting to.
51+
`apiVersion`[[config-api-version]]:: `String` -- Change the API that they client provides, specify the major version of the Elasticsearch nodes you will be connecting to.
5252
+
5353
WARNING: This default will track the latest version of Elasticsearch, and is only intended to be used during development. It is highly recommended that you set this parameter in all code that is headed to production.
5454

55-
Default ::: `'6.4'`
55+
Default ::: `'6.5'`
5656

5757
Options in node :::
58+
* `'6.6'`
5859
* `'6.5'`
5960
* `'6.4'`
6061
* `'6.3'`
@@ -75,17 +76,17 @@ Options in node :::
7576
* `'master'` (unstable)
7677

7778
Options in the browser :::
79+
* `'6.6'`
7880
* `'6.5'`
7981
* `'6.4'`
8082
* `'6.3'`
8183
* `'6.2'`
82-
* `'6.1'`
8384
* `'6.x'` (unstable)
8485
* `'master'` (unstable)
8586

8687

8788

88-
*`plugins`*[[config-plugins]]:: `Function[]` -- Plugin instantiators that will be called when the Client initializes. Each function is called in order with the arguments `Constructor`, `config`, and `components`.
89+
`plugins`[[config-plugins]]:: `Function[]` -- Plugin instantiators that will be called when the Client initializes. Each function is called in order with the arguments `Constructor`, `config`, and `components`.
8990
+
9091
`Constructor` is the class that will be newed up to create the client instance. It's prototype contains the api methods that correlate to the `apiVersion` requested.
9192
+
@@ -94,86 +95,86 @@ Options in the browser :::
9495
`components` is a map of the internal classes for this version of the elasticsearch client. The values on this object are listed https://github.com/elastic/elasticsearch-js/blob/master/src/lib/client.js#L80[here].
9596

9697

97-
*`sniffOnStart`*[[config-sniff-on-start]]:: `Boolean` -- Should the client attempt to detect the rest of the cluster when it is first instantiated?
98+
`sniffOnStart`[[config-sniff-on-start]]:: `Boolean` -- Should the client attempt to detect the rest of the cluster when it is first instantiated?
9899

99100
Default::: `false`
100101

101102

102103

103104

104105

105-
*`sniffInterval`*[[config-sniff-interval]]:: `Number, false` -- Every `n` milliseconds, perform a sniff operation and make sure our list of nodes is complete.
106+
`sniffInterval`[[config-sniff-interval]]:: `Number, false` -- Every `n` milliseconds, perform a sniff operation and make sure our list of nodes is complete.
106107

107108
Default::: `false`
108109

109110

110111

111112

112113

113-
*`sniffOnConnectionFault`*[[config-sniff-on-connection-fault]]:: `Boolean` -- Should the client immediately sniff for a more current list of nodes when a connection dies?
114+
`sniffOnConnectionFault`[[config-sniff-on-connection-fault]]:: `Boolean` -- Should the client immediately sniff for a more current list of nodes when a connection dies?
114115

115116
Default::: `false`
116117

117118

118119

119120

120-
*`maxRetries`*[[config-max-retries]]:: `Integer` -- How many times should the client try to connect to other nodes before returning a <<connection-fault,ConnectionFault>> error.
121+
`maxRetries`[[config-max-retries]]:: `Integer` -- How many times should the client try to connect to other nodes before returning a <<connection-fault,ConnectionFault>> error.
121122

122123
Default::: `3`
123124

124125

125126

126127

127128

128-
*`requestTimeout`*[[config-request-timeout]]:: `Number` -- Milliseconds before an HTTP request will be aborted and retried. This can also be set per request.
129+
`requestTimeout`[[config-request-timeout]]:: `Number` -- Milliseconds before an HTTP request will be aborted and retried. This can also be set per request.
129130

130131
Default::: `30000`
131132

132133

133134

134135

135136

136-
*`deadTimeout`*[[config-dead-timeout]]:: `Number` -- Milliseconds that a dead connection will wait before attempting to revive itself.
137+
`deadTimeout`[[config-dead-timeout]]:: `Number` -- Milliseconds that a dead connection will wait before attempting to revive itself.
137138

138139
Default::: `60000`
139140

140141

141-
*`pingTimeout`*[[config-ping-timeout]]:: `Number` -- Milliseconds that a ping request can take before timing out.
142+
`pingTimeout`[[config-ping-timeout]]:: `Number` -- Milliseconds that a ping request can take before timing out.
142143

143144
Default::: `3000`
144145

145146

146-
*`maxSockets`*[[config-keep-alive-max-sockets]]:: `Number` -- Maximum number of sockets to allow per host.
147+
`maxSockets`[[config-keep-alive-max-sockets]]:: `Number` -- Maximum number of sockets to allow per host.
147148

148149
Default::: `Infinity`
149150

150151

151-
*`keepAlive`*[[config-keep-alive]]:: `Boolean` -- Should the connections to the node be kept open forever? This behavior is recommended when you are connecting directly to Elasticsearch.
152+
`keepAlive`[[config-keep-alive]]:: `Boolean` -- Should the connections to the node be kept open forever? This behavior is recommended when you are connecting directly to Elasticsearch.
152153

153154
Default::: `true`
154155

155156

156-
*`keepAliveInterval`*[[config-keep-alive-interval]]:: `Number` -- How often, in milliseconds, should TCP KeepAlive packets be sent over sockets being kept alive. Only relevant if `keepAlive` is set to `true`.
157+
`keepAliveInterval`[[config-keep-alive-interval]]:: `Number` -- How often, in milliseconds, should TCP KeepAlive packets be sent over sockets being kept alive. Only relevant if `keepAlive` is set to `true`.
157158

158159
Default::: `1000`
159160

160161

161-
*`keepAliveMaxFreeSockets`*[[config-keep-alive-max-free-sockets]]:: `Number` -- Maximum number of inactive sockets to keep connected to a node. Only relevant if `keepAlive` is set to `true`.
162+
`keepAliveMaxFreeSockets`[[config-keep-alive-max-free-sockets]]:: `Number` -- Maximum number of inactive sockets to keep connected to a node. Only relevant if `keepAlive` is set to `true`.
162163

163164
Default::: `256`
164165

165166

166-
*`keepAliveFreeSocketTimeout`*[[config-keep-alive-free-socket-timeout]]:: `Number` -- Sets inactive sockets to timeout after milliseconds of inactivity. Only relevant if `keepAlive` is set to `true`.
167+
`keepAliveFreeSocketTimeout`[[config-keep-alive-free-socket-timeout]]:: `Number` -- Sets inactive sockets to timeout after milliseconds of inactivity. Only relevant if `keepAlive` is set to `true`.
167168

168169
Default::: `60000`
169170

170171

171-
*`suggestCompression`*[[config-suggest-compression]]:: `Boolean` -- The client should inform Elasticsearch, on each request, that it can accept compressed responses. In order for the responses to actually be compressed, you must enable `http.compression` in Elasticsearch. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-http.html[these docs] for additional info.
172+
`suggestCompression`[[config-suggest-compression]]:: `Boolean` -- The client should inform Elasticsearch, on each request, that it can accept compressed responses. In order for the responses to actually be compressed, you must enable `http.compression` in Elasticsearch. See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-http.html[these docs] for additional info.
172173

173174
Default::: `false`
174175

175176

176-
*`connectionClass`*[[config-connection-class]]:: `String, Constructor` -- Defines the class that will be used to create connections to store in the connection pool. If you are looking to implement additional protocols you should probably start by writing a Connection class that extends the ConnectionAbstract.
177+
`connectionClass`[[config-connection-class]]:: `String, Constructor` -- Defines the class that will be used to create connections to store in the connection pool. If you are looking to implement additional protocols you should probably start by writing a Connection class that extends the ConnectionAbstract.
177178

178179
Defaults:::
179180
* Node: `"http"`
@@ -182,12 +183,12 @@ Defaults:::
182183
* jQuery Build: `"jquery"`
183184

184185

185-
*`sniffedNodesProtocol`*[[config-sniffed-nodes-protocol]]:: `String` -- Defines the protocol that will be used to communicate with nodes discovered during sniffing.
186+
`sniffedNodesProtocol`[[config-sniffed-nodes-protocol]]:: `String` -- Defines the protocol that will be used to communicate with nodes discovered during sniffing.
186187

187188
Default::: If all of the hosts/host passed to the client via configuration use the same protocol then this defaults to that protocol, otherwise it defaults to `"http"`.
188189

189190

190-
*`ssl`*[[config-ssl]]:: `Object` -- An object defining HTTPS/SSL configuration to use for all nodes. The properties of this mimic the options accepted by http://nodejs.org/docs/latest/api/tls.html#tls_tls_connect_port_host_options_callback[`tls.connect()`] with the exception of `rejectUnauthorized`, which defaults to `false` allowing self-signed certificates to work out-of-the-box.
191+
`ssl`[[config-ssl]]:: `Object` -- An object defining HTTPS/SSL configuration to use for all nodes. The properties of this mimic the options accepted by http://nodejs.org/docs/latest/api/tls.html#tls_tls_connect_port_host_options_callback[`tls.connect()`] with the exception of `rejectUnauthorized`, which defaults to `false` allowing self-signed certificates to work out-of-the-box.
191192
+
192193
Additional information available in <<auth-reference>>.
193194

@@ -217,7 +218,7 @@ var client = new elasticsearch.Client({
217218
-----
218219

219220

220-
*`selector`*[[config-selector]]:: `String, Function` -- This function will be used to select a connection from the ConnectionPool. It should received a single argument, the list of "active" connections, and return the connection to use. Use this selector to implement special logic for your client such as preferring nodes in a certain rack or data-center.
221+
`selector`[[config-selector]]:: `String, Function` -- This function will be used to select a connection from the ConnectionPool. It should received a single argument, the list of "active" connections, and return the connection to use. Use this selector to implement special logic for your client such as preferring nodes in a certain rack or data-center.
221222
+
222223
To make this function asynchronous, accept a second argument which will be the callback to use. The callback should be called Node-style with a possible error like: `cb(err, selectedConnection)`.
223224

@@ -231,7 +232,7 @@ Options:::
231232

232233

233234

234-
*`defer`*[[config-defer]]:: `Function` -- Override the way that the client creates promises. If you would rather use any other promise library this is how you'd do that. Elasticsearch.js expects that the defer object has a `promise` property (which will be returned to promise consumers), as well as `resolve` and `reject` methods.
235+
`defer`[[config-defer]]:: `Function` -- Override the way that the client creates promises. If you would rather use any other promise library this is how you'd do that. Elasticsearch.js expects that the defer object has a `promise` property (which will be returned to promise consumers), as well as `resolve` and `reject` methods.
235236

236237
Default::: Defer object created with ES6 Promise
237238

@@ -249,15 +250,15 @@ var client = new elasticsearch.Client({
249250

250251

251252

252-
*`nodesToHostCallback`*[[config-nodes-to-host-callback]]:: `Function` - This function will receive the list of nodes returned from the `_cluster/nodes` API during a sniff operation. The function should return an array of objects which match the <<config-hosts,specification for the `hosts` config>>.
253+
`nodesToHostCallback`[[config-nodes-to-host-callback]]:: `Function` - This function will receive the list of nodes returned from the `_cluster/nodes` API during a sniff operation. The function should return an array of objects which match the <<config-hosts,specification for the `hosts` config>>.
253254

254255
Default:::
255256
see https://github.com/elasticsearch/elasticsearch-js/blob/master/src/lib/nodes_to_host.js[nodes_to_host.js]
256257

257258

258259

259260

260-
*`createNodeAgent`*[[config-create-node-agent]]:: `Function` -- Override the way that the client creates node.js `Agent`[https://nodejs.org/api/http.html#http_class_http_agent] objects. The value of this property will be executed every time a new Node is added to the client (either from the initial seed or from sniffing) and can return any value that node's http(s) module accepts as `agent:` configuration.
261+
`createNodeAgent`[[config-create-node-agent]]:: `Function` -- Override the way that the client creates node.js `Agent`[https://nodejs.org/api/http.html#http_class_http_agent] objects. The value of this property will be executed every time a new Node is added to the client (either from the initial seed or from sniffing) and can return any value that node's http(s) module accepts as `agent:` configuration.
261262
+
262263
The function is called with two arguments, first an `HttpConnector`[http://github.com/spalger/elasticsearch-js/blob/master/src/lib/connectors/http.js] object and the second the config object initially passed when creating the client.
263264

@@ -276,31 +277,6 @@ var client = new elasticsearch.Client({
276277

277278

278279

279-
*`serializer`*[[config-serializer]]:: `Serializer` -- Override the way that the client serializes the JSON payload sent to elasticsearch. This can be useful if you're using a third party library that needs to convert to "plain" JS objects, such as with https://github.com/elastic/elasticsearch-js/blob/master/src/lib/serializers/angular.js[angular.js]. Another helpful use case is in an advanced scenario where your application assembles queries dynamically. Using a stable stringify in that case ensures property order to prevent cache misses (as outlined in https://github.com/elastic/elasticsearch-js/issues/695[GH Issue 695]).
280-
281-
Default::: see https://github.com/elastic/elasticsearch-js/blob/master/src/lib/serializers/json.js[json.js]
282-
283-
To Use Stable Stringification:::
284-
+
285-
[source,js]
286-
-----
287-
import DefaultJsonSerializer from 'elasticsearch/src/lib/serializers/json';
288-
import jsonStableStringify from 'json-stable-stringify';
289-
290-
class CustomSerializer extends DefaultJsonSerializer {
291-
serialize(val, replacer, space) {
292-
return jsonStableStringify(val, { replacer, space })
293-
}
294-
}
295-
296-
CustomSerializer.prototype.serialize.contentType = 'application/json';
297-
298-
const client = new elasticsearch.Client({
299-
serializer: CustomSerializer
300-
})
301-
-----
302-
303-
304280

305281
=== Examples
306282

docs/index.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ include::logging.asciidoc[]
2020

2121
include::development.asciidoc[]
2222

23-
include::api_methods_6_5.asciidoc[]
23+
include::api_methods_6_6.asciidoc[]
2424

2525
include::api_methods.asciidoc[]
2626

27+
include::api_methods_6_4.asciidoc[]
28+
2729
include::api_methods_6_3.asciidoc[]
2830

2931
include::api_methods_6_2.asciidoc[]

0 commit comments

Comments
 (0)