35 lines
561 B
Plaintext
35 lines
561 B
Plaintext
// This file is autogenerated, DO NOT EDIT
|
|
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
|
|
|
[source, js]
|
|
----
|
|
const response0 = await client.index({
|
|
index: 'twitter',
|
|
id: '1',
|
|
refresh: true,
|
|
body: {
|
|
user: 'kimchy'
|
|
}
|
|
})
|
|
console.log(response0)
|
|
|
|
const response1 = await client.count({
|
|
index: 'twitter',
|
|
q: 'user:kimchy'
|
|
})
|
|
console.log(response1)
|
|
|
|
const response2 = await client.count({
|
|
index: 'twitter',
|
|
body: {
|
|
query: {
|
|
term: {
|
|
user: 'kimchy'
|
|
}
|
|
}
|
|
}
|
|
})
|
|
console.log(response2)
|
|
----
|
|
|