Update docs examples (#1081)
* Updated enabled files list * Generated docs examples * Generated docs examples
This commit is contained in:
committed by
GitHub
parent
41927914bb
commit
28205e97cf
23
docs/doc_examples/047266b0d20fdb62ebc72d51952c8f6d.asciidoc
Normal file
23
docs/doc_examples/047266b0d20fdb62ebc72d51952c8f6d.asciidoc
Normal file
@ -0,0 +1,23 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
multi_match: {
|
||||
query: 'Will Smith',
|
||||
type: 'cross_fields',
|
||||
fields: [
|
||||
'first_name',
|
||||
'last_name'
|
||||
],
|
||||
operator: 'and'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
24
docs/doc_examples/0989cc65d8924f666ce3eb0820d2d244.asciidoc
Normal file
24
docs/doc_examples/0989cc65d8924f666ce3eb0820d2d244.asciidoc
Normal file
@ -0,0 +1,24 @@
|
||||
// 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: 'users',
|
||||
refresh: 'wait_for',
|
||||
body: {
|
||||
user_id: 12345
|
||||
}
|
||||
})
|
||||
console.log(response0)
|
||||
|
||||
const response1 = await client.index({
|
||||
index: 'users',
|
||||
refresh: 'wait_for',
|
||||
body: {
|
||||
user_id: 12346
|
||||
}
|
||||
})
|
||||
console.log(response1)
|
||||
----
|
||||
|
||||
22
docs/doc_examples/0bbd30b9be3e54ff3028b9f4459634d2.asciidoc
Normal file
22
docs/doc_examples/0bbd30b9be3e54ff3028b9f4459634d2.asciidoc
Normal file
@ -0,0 +1,22 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.putMapping({
|
||||
index: 'my_index',
|
||||
body: {
|
||||
properties: {
|
||||
name: {
|
||||
properties: {
|
||||
last: {
|
||||
type: 'text'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
22
docs/doc_examples/0e118857b815b62118a30c042f079db1.asciidoc
Normal file
22
docs/doc_examples/0e118857b815b62118a30c042f079db1.asciidoc
Normal file
@ -0,0 +1,22 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
multi_match: {
|
||||
query: 'quick brown f',
|
||||
type: 'phrase_prefix',
|
||||
fields: [
|
||||
'subject',
|
||||
'message'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
11
docs/doc_examples/12433d2b637d002e8d5c9a1adce69d3b.asciidoc
Normal file
11
docs/doc_examples/12433d2b637d002e8d5c9a1adce69d3b.asciidoc
Normal file
@ -0,0 +1,11 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.create({
|
||||
index: 'publications'
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
11
docs/doc_examples/168bfdde773570cfc6dd3ab3574e413b.asciidoc
Normal file
11
docs/doc_examples/168bfdde773570cfc6dd3ab3574e413b.asciidoc
Normal file
@ -0,0 +1,11 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
q: 'user:kimchy'
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
24
docs/doc_examples/179f0a3e84ff4bbac18787a018eabf89.asciidoc
Normal file
24
docs/doc_examples/179f0a3e84ff4bbac18787a018eabf89.asciidoc
Normal file
@ -0,0 +1,24 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
multi_match: {
|
||||
query: 'Jon',
|
||||
type: 'cross_fields',
|
||||
analyzer: 'standard',
|
||||
fields: [
|
||||
'first',
|
||||
'last',
|
||||
'*.edge'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
19
docs/doc_examples/17de0020b228df961ad3c6b06233c948.asciidoc
Normal file
19
docs/doc_examples/17de0020b228df961ad3c6b06233c948.asciidoc
Normal file
@ -0,0 +1,19 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.putMapping({
|
||||
index: 'my_index',
|
||||
body: {
|
||||
properties: {
|
||||
user_id: {
|
||||
type: 'keyword',
|
||||
ignore_above: 100
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
28
docs/doc_examples/1da77e114459e0b77d78a3dcc8fae429.asciidoc
Normal file
28
docs/doc_examples/1da77e114459e0b77d78a3dcc8fae429.asciidoc
Normal file
@ -0,0 +1,28 @@
|
||||
// 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.indices.create({
|
||||
index: 'twitter-1'
|
||||
})
|
||||
console.log(response0)
|
||||
|
||||
const response1 = await client.indices.create({
|
||||
index: 'twitter-2'
|
||||
})
|
||||
console.log(response1)
|
||||
|
||||
const response2 = await client.indices.putMapping({
|
||||
index: 'twitter-1,twitter-2',
|
||||
body: {
|
||||
properties: {
|
||||
user_name: {
|
||||
type: 'text'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response2)
|
||||
----
|
||||
|
||||
21
docs/doc_examples/1f6fe6833686e38c3711c6f2aa00a078.asciidoc
Normal file
21
docs/doc_examples/1f6fe6833686e38c3711c6f2aa00a078.asciidoc
Normal file
@ -0,0 +1,21 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.create({
|
||||
index: 'my_index',
|
||||
body: {
|
||||
mappings: {
|
||||
properties: {
|
||||
user_id: {
|
||||
type: 'keyword',
|
||||
ignore_above: 20
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
11
docs/doc_examples/210cf5c76bff517f48e80fa1c2d63907.asciidoc
Normal file
11
docs/doc_examples/210cf5c76bff517f48e80fa1c2d63907.asciidoc
Normal file
@ -0,0 +1,11 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.getMapping({
|
||||
index: 'my_index'
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
28
docs/doc_examples/33f148e3d8676de6cc52f58749898a13.asciidoc
Normal file
28
docs/doc_examples/33f148e3d8676de6cc52f58749898a13.asciidoc
Normal file
@ -0,0 +1,28 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
dis_max: {
|
||||
queries: [
|
||||
{
|
||||
match_phrase_prefix: {
|
||||
subject: 'quick brown f'
|
||||
}
|
||||
},
|
||||
{
|
||||
match_phrase_prefix: {
|
||||
message: 'quick brown f'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
38
docs/doc_examples/3cd50a789b8e1f0ebbbc53a8d7ecf656.asciidoc
Normal file
38
docs/doc_examples/3cd50a789b8e1f0ebbbc53a8d7ecf656.asciidoc
Normal file
@ -0,0 +1,38 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
bool: {
|
||||
should: [
|
||||
{
|
||||
multi_match: {
|
||||
query: 'Will Smith',
|
||||
type: 'cross_fields',
|
||||
fields: [
|
||||
'first',
|
||||
'last'
|
||||
],
|
||||
minimum_should_match: '50%'
|
||||
}
|
||||
},
|
||||
{
|
||||
multi_match: {
|
||||
query: 'Will Smith',
|
||||
type: 'cross_fields',
|
||||
fields: [
|
||||
'*.edge'
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
12
docs/doc_examples/43682666e1abcb14770c99f02eb26a0d.asciidoc
Normal file
12
docs/doc_examples/43682666e1abcb14770c99f02eb26a0d.asciidoc
Normal file
@ -0,0 +1,12 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
index: '*',
|
||||
q: 'user:kimchy'
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
21
docs/doc_examples/53b908c3432118c5a6e460f74d32006b.asciidoc
Normal file
21
docs/doc_examples/53b908c3432118c5a6e460f74d32006b.asciidoc
Normal file
@ -0,0 +1,21 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
multi_match: {
|
||||
query: 'this is a test',
|
||||
fields: [
|
||||
'subject',
|
||||
'message'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
18
docs/doc_examples/53d938c754f36a912fcbe6473abb463f.asciidoc
Normal file
18
docs/doc_examples/53d938c754f36a912fcbe6473abb463f.asciidoc
Normal file
@ -0,0 +1,18 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.reindex({
|
||||
body: {
|
||||
source: {
|
||||
index: 'users'
|
||||
},
|
||||
dest: {
|
||||
index: 'new_users'
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
18
docs/doc_examples/5be23858b35043fcb7b50fe36b873e6e.asciidoc
Normal file
18
docs/doc_examples/5be23858b35043fcb7b50fe36b873e6e.asciidoc
Normal file
@ -0,0 +1,18 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.putMapping({
|
||||
index: 'twitter',
|
||||
body: {
|
||||
properties: {
|
||||
email: {
|
||||
type: 'keyword'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
@ -9,7 +9,7 @@ const response = await client.search({
|
||||
range: {
|
||||
timestamp: {
|
||||
time_zone: '+01:00',
|
||||
gte: '2015-01-01 00:00:00',
|
||||
gte: '2020-01-01T00:00:00',
|
||||
lte: 'now'
|
||||
}
|
||||
}
|
||||
23
docs/doc_examples/5da6efd5b038ada64c9e853c88c1ec47.asciidoc
Normal file
23
docs/doc_examples/5da6efd5b038ada64c9e853c88c1ec47.asciidoc
Normal file
@ -0,0 +1,23 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
multi_match: {
|
||||
query: 'brown fox',
|
||||
type: 'best_fields',
|
||||
fields: [
|
||||
'subject',
|
||||
'message'
|
||||
],
|
||||
tie_breaker: 0.3
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
23
docs/doc_examples/5f3a3eefeefe6fa85ec49d499212d245.asciidoc
Normal file
23
docs/doc_examples/5f3a3eefeefe6fa85ec49d499212d245.asciidoc
Normal file
@ -0,0 +1,23 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.putMapping({
|
||||
index: 'my_index',
|
||||
body: {
|
||||
properties: {
|
||||
city: {
|
||||
type: 'text',
|
||||
fields: {
|
||||
raw: {
|
||||
type: 'keyword'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
22
docs/doc_examples/68721288dc9ad8aa1b55099b4d303051.asciidoc
Normal file
22
docs/doc_examples/68721288dc9ad8aa1b55099b4d303051.asciidoc
Normal file
@ -0,0 +1,22 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
multi_match: {
|
||||
query: 'quick brown f',
|
||||
type: 'bool_prefix',
|
||||
fields: [
|
||||
'subject',
|
||||
'message'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
21
docs/doc_examples/6a1702dd50690cae833572e48a0ddf25.asciidoc
Normal file
21
docs/doc_examples/6a1702dd50690cae833572e48a0ddf25.asciidoc
Normal file
@ -0,0 +1,21 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
multi_match: {
|
||||
query: 'Will Smith',
|
||||
fields: [
|
||||
'title',
|
||||
'*_name'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
33
docs/doc_examples/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc
Normal file
33
docs/doc_examples/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc
Normal file
@ -0,0 +1,33 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
bool: {
|
||||
should: [
|
||||
{
|
||||
match: {
|
||||
title: 'quick brown fox'
|
||||
}
|
||||
},
|
||||
{
|
||||
match: {
|
||||
'title.original': 'quick brown fox'
|
||||
}
|
||||
},
|
||||
{
|
||||
match: {
|
||||
'title.shingles': 'quick brown fox'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
20
docs/doc_examples/6bf63f2ec6ba55fcaf1092f48212bf25.asciidoc
Normal file
20
docs/doc_examples/6bf63f2ec6ba55fcaf1092f48212bf25.asciidoc
Normal file
@ -0,0 +1,20 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.create({
|
||||
index: 'my_index',
|
||||
body: {
|
||||
mappings: {
|
||||
properties: {
|
||||
user_identifier: {
|
||||
type: 'keyword'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
20
docs/doc_examples/734c2e2a1e45b84f1e4e65b51356fcd7.asciidoc
Normal file
20
docs/doc_examples/734c2e2a1e45b84f1e4e65b51356fcd7.asciidoc
Normal file
@ -0,0 +1,20 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.create({
|
||||
index: 'new_users',
|
||||
body: {
|
||||
mappings: {
|
||||
properties: {
|
||||
user_id: {
|
||||
type: 'keyword'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
23
docs/doc_examples/7b908b1189f076942de8cd497ff1fa59.asciidoc
Normal file
23
docs/doc_examples/7b908b1189f076942de8cd497ff1fa59.asciidoc
Normal file
@ -0,0 +1,23 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
multi_match: {
|
||||
query: 'quick brown fox',
|
||||
type: 'most_fields',
|
||||
fields: [
|
||||
'title',
|
||||
'title.original',
|
||||
'title.shingles'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
12
docs/doc_examples/8022e6a690344035b6472a43a9d122e0.asciidoc
Normal file
12
docs/doc_examples/8022e6a690344035b6472a43a9d122e0.asciidoc
Normal file
@ -0,0 +1,12 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
index: '_all',
|
||||
q: 'user:kimchy'
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
80
docs/doc_examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc
Normal file
80
docs/doc_examples/8cd00a3aba7c3c158277bc032aac2830.asciidoc
Normal file
@ -0,0 +1,80 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.bulk({
|
||||
body: [
|
||||
{
|
||||
update: {
|
||||
_id: '1',
|
||||
_index: 'index1',
|
||||
retry_on_conflict: 3
|
||||
}
|
||||
},
|
||||
{
|
||||
doc: {
|
||||
field: 'value'
|
||||
}
|
||||
},
|
||||
{
|
||||
update: {
|
||||
_id: '0',
|
||||
_index: 'index1',
|
||||
retry_on_conflict: 3
|
||||
}
|
||||
},
|
||||
{
|
||||
script: {
|
||||
source: 'ctx._source.counter += params.param1',
|
||||
lang: 'painless',
|
||||
params: {
|
||||
param1: 1
|
||||
}
|
||||
},
|
||||
upsert: {
|
||||
counter: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
update: {
|
||||
_id: '2',
|
||||
_index: 'index1',
|
||||
retry_on_conflict: 3
|
||||
}
|
||||
},
|
||||
{
|
||||
doc: {
|
||||
field: 'value'
|
||||
},
|
||||
doc_as_upsert: true
|
||||
},
|
||||
{
|
||||
update: {
|
||||
_id: '3',
|
||||
_index: 'index1',
|
||||
_source: true
|
||||
}
|
||||
},
|
||||
{
|
||||
doc: {
|
||||
field: 'value'
|
||||
}
|
||||
},
|
||||
{
|
||||
update: {
|
||||
_id: '4',
|
||||
_index: 'index1'
|
||||
}
|
||||
},
|
||||
{
|
||||
doc: {
|
||||
field: 'value'
|
||||
},
|
||||
_source: true
|
||||
}
|
||||
]
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
11
docs/doc_examples/98f14fddddea54a7d6149ab7b92e099d.asciidoc
Normal file
11
docs/doc_examples/98f14fddddea54a7d6149ab7b92e099d.asciidoc
Normal file
@ -0,0 +1,11 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.delete({
|
||||
index: 'twitter'
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
12
docs/doc_examples/9bdd3c0d47e60c8cfafc8109f9369922.asciidoc
Normal file
12
docs/doc_examples/9bdd3c0d47e60c8cfafc8109f9369922.asciidoc
Normal file
@ -0,0 +1,12 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
index: 'twitter',
|
||||
q: 'tag:wow'
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
24
docs/doc_examples/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc
Normal file
24
docs/doc_examples/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc
Normal file
@ -0,0 +1,24 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
multi_match: {
|
||||
query: 'Jon',
|
||||
type: 'cross_fields',
|
||||
fields: [
|
||||
'first',
|
||||
'first.edge',
|
||||
'last',
|
||||
'last.edge'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
47
docs/doc_examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc
Normal file
47
docs/doc_examples/ae9ccfaa146731ab9176df90670db1c2.asciidoc
Normal file
@ -0,0 +1,47 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.bulk({
|
||||
body: [
|
||||
{
|
||||
index: {
|
||||
_index: 'test',
|
||||
_id: '1'
|
||||
}
|
||||
},
|
||||
{
|
||||
field1: 'value1'
|
||||
},
|
||||
{
|
||||
delete: {
|
||||
_index: 'test',
|
||||
_id: '2'
|
||||
}
|
||||
},
|
||||
{
|
||||
create: {
|
||||
_index: 'test',
|
||||
_id: '3'
|
||||
}
|
||||
},
|
||||
{
|
||||
field1: 'value3'
|
||||
},
|
||||
{
|
||||
update: {
|
||||
_id: '1',
|
||||
_index: 'test'
|
||||
}
|
||||
},
|
||||
{
|
||||
doc: {
|
||||
field2: 'value2'
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
19
docs/doc_examples/afc29b61c532cf683f749baf013e7bfe.asciidoc
Normal file
19
docs/doc_examples/afc29b61c532cf683f749baf013e7bfe.asciidoc
Normal file
@ -0,0 +1,19 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.putMapping({
|
||||
index: 'my_index',
|
||||
body: {
|
||||
properties: {
|
||||
user_id: {
|
||||
type: 'alias',
|
||||
path: 'user_identifier'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
29
docs/doc_examples/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc
Normal file
29
docs/doc_examples/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc
Normal file
@ -0,0 +1,29 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
dis_max: {
|
||||
queries: [
|
||||
{
|
||||
match: {
|
||||
subject: 'brown fox'
|
||||
}
|
||||
},
|
||||
{
|
||||
match: {
|
||||
message: 'brown fox'
|
||||
}
|
||||
}
|
||||
],
|
||||
tie_breaker: 0.3
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
20
docs/doc_examples/bd5918ab903c0889bb1f09c8c2466e43.asciidoc
Normal file
20
docs/doc_examples/bd5918ab903c0889bb1f09c8c2466e43.asciidoc
Normal file
@ -0,0 +1,20 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.create({
|
||||
index: 'users',
|
||||
body: {
|
||||
mappings: {
|
||||
properties: {
|
||||
user_id: {
|
||||
type: 'long'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
12
docs/doc_examples/be49260e1b3496c4feac38c56ebb0669.asciidoc
Normal file
12
docs/doc_examples/be49260e1b3496c4feac38c56ebb0669.asciidoc
Normal file
@ -0,0 +1,12 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
index: 'twitter',
|
||||
q: 'user:kimchy'
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
20
docs/doc_examples/c849c6c8f8659dbb93e1c14356f74e37.asciidoc
Normal file
20
docs/doc_examples/c849c6c8f8659dbb93e1c14356f74e37.asciidoc
Normal file
@ -0,0 +1,20 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.create({
|
||||
index: 'my_index',
|
||||
body: {
|
||||
mappings: {
|
||||
properties: {
|
||||
city: {
|
||||
type: 'text'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
24
docs/doc_examples/d9474f66970c6955e24b17c7447e7b5f.asciidoc
Normal file
24
docs/doc_examples/d9474f66970c6955e24b17c7447e7b5f.asciidoc
Normal file
@ -0,0 +1,24 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.create({
|
||||
index: 'my_index',
|
||||
body: {
|
||||
mappings: {
|
||||
properties: {
|
||||
name: {
|
||||
properties: {
|
||||
first: {
|
||||
type: 'text'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
23
docs/doc_examples/e270f3f721a5712cd11a5ca03554f5b0.asciidoc
Normal file
23
docs/doc_examples/e270f3f721a5712cd11a5ca03554f5b0.asciidoc
Normal file
@ -0,0 +1,23 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
multi_match: {
|
||||
query: 'Will Smith',
|
||||
type: 'best_fields',
|
||||
fields: [
|
||||
'first_name',
|
||||
'last_name'
|
||||
],
|
||||
operator: 'and'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
21
docs/doc_examples/e30ea6e3823a139d7693d8cce1920a06.asciidoc
Normal file
21
docs/doc_examples/e30ea6e3823a139d7693d8cce1920a06.asciidoc
Normal file
@ -0,0 +1,21 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
body: {
|
||||
query: {
|
||||
multi_match: {
|
||||
query: 'this is a test',
|
||||
fields: [
|
||||
'subject^3',
|
||||
'message'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
18
docs/doc_examples/e4be53736bcc02b03068fd72fdbfe271.asciidoc
Normal file
18
docs/doc_examples/e4be53736bcc02b03068fd72fdbfe271.asciidoc
Normal file
@ -0,0 +1,18 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.putMapping({
|
||||
index: 'publications',
|
||||
body: {
|
||||
properties: {
|
||||
title: {
|
||||
type: 'text'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
12
docs/doc_examples/f5569945024b9d664828693705c27c1a.asciidoc
Normal file
12
docs/doc_examples/f5569945024b9d664828693705c27c1a.asciidoc
Normal file
@ -0,0 +1,12 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.search({
|
||||
index: 'kimchy,elasticsearch',
|
||||
q: 'user:kimchy'
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.cat.health({
|
||||
v: ''
|
||||
v: true
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
@ -44,7 +44,12 @@ const enabledFiles = [
|
||||
'indices/create-index.asciidoc',
|
||||
'docs/index_.asciidoc',
|
||||
'aggregations/bucket/terms-aggregation.asciidoc',
|
||||
'query-dsl/range-query.asciidoc'
|
||||
'query-dsl/range-query.asciidoc',
|
||||
'search/search.asciidoc',
|
||||
'query-dsl/multi-match-query.asciidoc',
|
||||
'docs/bulk.asciidoc',
|
||||
'indices/delete-index.asciidoc',
|
||||
'indices/put-mapping.asciidoc'
|
||||
]
|
||||
|
||||
function generate () {
|
||||
|
||||
Reference in New Issue
Block a user