-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated generate-docs-examples script * Updated docs examples
- Loading branch information
Showing
42 changed files
with
982 additions
and
3 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
docs/doc_examples/028f6d6ac2594e20b78b8a8f8cbad49d.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// 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: { | ||
aggs: { | ||
countries: { | ||
terms: { | ||
field: 'artist.country', | ||
order: [ | ||
{ | ||
'rock>playback_stats.avg': 'desc' | ||
}, | ||
{ | ||
_count: 'desc' | ||
} | ||
] | ||
}, | ||
aggs: { | ||
rock: { | ||
filter: { | ||
term: { | ||
genre: 'rock' | ||
} | ||
}, | ||
aggs: { | ||
playback_stats: { | ||
stats: { | ||
field: 'play_count' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
22 changes: 22 additions & 0 deletions
22
docs/doc_examples/033778305d52746f5ce0a2a922c8e521.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: { | ||
aggs: { | ||
genres: { | ||
terms: { | ||
script: { | ||
source: "doc['genre'].value", | ||
lang: 'painless' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
48 changes: 48 additions & 0 deletions
48
docs/doc_examples/06afce2955f9094d96d27067ebca32e8.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// 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: { | ||
must: { | ||
term: { | ||
user: 'kimchy' | ||
} | ||
}, | ||
filter: { | ||
term: { | ||
tag: 'tech' | ||
} | ||
}, | ||
must_not: { | ||
range: { | ||
age: { | ||
gte: 10, | ||
lte: 20 | ||
} | ||
} | ||
}, | ||
should: [ | ||
{ | ||
term: { | ||
tag: 'wow' | ||
} | ||
}, | ||
{ | ||
term: { | ||
tag: 'elasticsearch' | ||
} | ||
} | ||
], | ||
minimum_should_match: 1, | ||
boost: 1 | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
21 changes: 21 additions & 0 deletions
21
docs/doc_examples/0ac9916f47a2483b89c1416684af322a.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: { | ||
match: { | ||
message: { | ||
query: 'to be or not to be', | ||
operator: 'and', | ||
zero_terms_query: 'all' | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
21 changes: 21 additions & 0 deletions
21
docs/doc_examples/0afaf1cad692e6201aa574c8feb6e622.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: { | ||
aggs: { | ||
tags: { | ||
terms: { | ||
field: 'tags', | ||
include: '.*sport.*', | ||
exclude: 'water_.*' | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
21 changes: 21 additions & 0 deletions
21
docs/doc_examples/162b5b693b713f0bfab1209d59443c46.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: { | ||
constant_score: { | ||
filter: { | ||
term: { | ||
status: 'active' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
11 changes: 11 additions & 0 deletions
11
docs/doc_examples/1c23507edd7a3c18538b68223378e4ab.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: 'twitter' | ||
}) | ||
console.log(response) | ||
---- | ||
|
29 changes: 29 additions & 0 deletions
29
docs/doc_examples/34efeade38445b2834749ced59782e25.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: { | ||
aggs: { | ||
genres: { | ||
terms: { | ||
field: 'genre', | ||
order: { | ||
'playback_stats.max': 'desc' | ||
} | ||
}, | ||
aggs: { | ||
playback_stats: { | ||
stats: { | ||
field: 'play_count' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
21 changes: 21 additions & 0 deletions
21
docs/doc_examples/35e8da9410b8432cf4095f2541ad7b1d.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: { | ||
aggs: { | ||
products: { | ||
terms: { | ||
field: 'product', | ||
size: 5, | ||
show_term_doc_count_error: true | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
20 changes: 20 additions & 0 deletions
20
docs/doc_examples/4466d410e06712c63328de4db249e6da.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.search({ | ||
body: { | ||
query: { | ||
range: { | ||
timestamp: { | ||
gte: 'now-1d/d', | ||
lt: 'now/d' | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
24 changes: 24 additions & 0 deletions
24
docs/doc_examples/4646764bf09911fee7d58630c72d3137.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: { | ||
aggs: { | ||
genres: { | ||
terms: { | ||
script: { | ||
id: 'my_script', | ||
params: { | ||
field: 'genre' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
16 changes: 16 additions & 0 deletions
16
docs/doc_examples/4d46dbb96125b27f46299547de9d8709.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// 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: 'test', | ||
body: { | ||
settings: { | ||
'index.write.wait_for_active_shards': '2' | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
24 changes: 24 additions & 0 deletions
24
docs/doc_examples/4d56b179242fed59e3d6476f817b6055.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: 'test', | ||
body: { | ||
aliases: { | ||
alias_1: {}, | ||
alias_2: { | ||
filter: { | ||
term: { | ||
user: 'kimchy' | ||
} | ||
}, | ||
routing: 'kimchy' | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
20 changes: 20 additions & 0 deletions
20
docs/doc_examples/5043b83a89091fa00edb341ddf7ba370.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.search({ | ||
body: { | ||
query: { | ||
match: { | ||
message: { | ||
query: 'this is a testt', | ||
fuzziness: 'AUTO' | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
20 changes: 20 additions & 0 deletions
20
docs/doc_examples/527324766814561b75aaee853ede49a7.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.search({ | ||
body: { | ||
aggs: { | ||
tags: { | ||
terms: { | ||
field: 'tags', | ||
min_doc_count: 10 | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
21 changes: 21 additions & 0 deletions
21
docs/doc_examples/5d13a71fa7fda73b15111803b1c7cfd3.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: { | ||
range: { | ||
timestamp: { | ||
time_zone: '+01:00', | ||
gte: '2015-01-01 00:00:00', | ||
lte: 'now' | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
console.log(response) | ||
---- | ||
|
Oops, something went wrong.