You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const client = new Client({ node: 'http://localhost:9200' })
66
+
const { Client: Client6 } = require('es6')
67
+
const { Client: Client7 } = require('es7')
40
68
41
-
// promise API
42
-
const result = await client.search({
43
-
index: 'my-index',
44
-
body: { foo: 'bar' }
45
-
})
69
+
const client6 = new Client6({ node: 'http://localhost:9200' })
70
+
const client7 = new Client7({ node: 'http://localhost:9201' })
46
71
47
-
// callback API
48
-
client.search({
49
-
index: 'my-index',
50
-
body: { foo: 'bar' }
51
-
}, (err, result) => {
52
-
if (err) console.log(err)
53
-
})
72
+
client6.info(console.log)
73
+
client7.info(console.log)
74
+
----
75
+
76
+
Finally, if you want to install the client for the next version of Elasticsearch (the one that lives in Elasticsearch's master branch), you can use the following command:
0 commit comments