-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto-generated code for 8.15 (#2424)
- Loading branch information
1 parent
43175e1
commit 5d4bd65
Showing
21 changed files
with
387 additions
and
77 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
docs/doc_examples/0c8be7aec84ea86b243904f5d4162f5a.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,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.search({ | ||
index: "cooking_blog", | ||
query: { | ||
match: { | ||
title: { | ||
query: "fluffy pancakes breakfast", | ||
minimum_should_match: 2, | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
18 changes: 0 additions & 18 deletions
18
docs/doc_examples/18de6782bd18f4a9baec2feec8c02a8b.asciidoc
This file was deleted.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
docs/doc_examples/191074b2eebd5f74e628c2ada4b6d2e4.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,55 @@ | ||
// 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: "cooking_blog", | ||
query: { | ||
bool: { | ||
must: [ | ||
{ | ||
term: { | ||
"category.keyword": "Main Course", | ||
}, | ||
}, | ||
{ | ||
term: { | ||
tags: "vegetarian", | ||
}, | ||
}, | ||
{ | ||
range: { | ||
rating: { | ||
gte: 4.5, | ||
}, | ||
}, | ||
}, | ||
], | ||
should: [ | ||
{ | ||
multi_match: { | ||
query: "curry spicy", | ||
fields: ["title^2", "description"], | ||
}, | ||
}, | ||
{ | ||
range: { | ||
date: { | ||
gte: "now-1M/d", | ||
}, | ||
}, | ||
}, | ||
], | ||
must_not: [ | ||
{ | ||
term: { | ||
"category.keyword": "Dessert", | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
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
42 changes: 42 additions & 0 deletions
42
docs/doc_examples/49a19615ebe2c013b8321152163478ab.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,42 @@ | ||
// 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.index({ | ||
index: "my-index-000001", | ||
id: 1, | ||
refresh: "true", | ||
document: { | ||
text: "quick brown fox", | ||
}, | ||
}); | ||
console.log(response); | ||
const response1 = await client.index({ | ||
index: "my-index-000001", | ||
id: 2, | ||
refresh: "true", | ||
document: { | ||
text: "quick fox", | ||
}, | ||
}); | ||
console.log(response1); | ||
const response2 = await client.search({ | ||
index: "my-index-000001", | ||
query: { | ||
script_score: { | ||
query: { | ||
match: { | ||
text: "quick brown fox", | ||
}, | ||
}, | ||
script: { | ||
source: "_termStats.termFreq().getAverage()", | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response2); | ||
---- |
18 changes: 18 additions & 0 deletions
18
docs/doc_examples/58dd26afc919722e21358c91e112b27a.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,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.search({ | ||
index: "cooking_blog", | ||
query: { | ||
range: { | ||
date: { | ||
gte: "2023-05-01", | ||
lte: "2023-05-31", | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
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
18 changes: 18 additions & 0 deletions
18
docs/doc_examples/77082b1ffaae9ac52dfc133fa597baa7.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,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.search({ | ||
index: "cooking_blog", | ||
query: { | ||
match: { | ||
description: { | ||
query: "fluffy pancakes", | ||
operator: "and", | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
23 changes: 0 additions & 23 deletions
23
docs/doc_examples/7a32f44a1511ecb0d3f0b0ff2aca5c44.asciidoc
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
docs/doc_examples/7db798942cf2d334456e30ef5fcb801b.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,17 @@ | ||
// 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: "cooking_blog", | ||
query: { | ||
match: { | ||
description: { | ||
query: "fluffy pancakes", | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
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
61 changes: 61 additions & 0 deletions
61
docs/doc_examples/8d05862be1f9e7edaba162b1888b5677.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,61 @@ | ||
// 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: "cooking_blog", | ||
properties: { | ||
title: { | ||
type: "text", | ||
analyzer: "standard", | ||
fields: { | ||
keyword: { | ||
type: "keyword", | ||
ignore_above: 256, | ||
}, | ||
}, | ||
}, | ||
description: { | ||
type: "text", | ||
fields: { | ||
keyword: { | ||
type: "keyword", | ||
}, | ||
}, | ||
}, | ||
author: { | ||
type: "text", | ||
fields: { | ||
keyword: { | ||
type: "keyword", | ||
}, | ||
}, | ||
}, | ||
date: { | ||
type: "date", | ||
format: "yyyy-MM-dd", | ||
}, | ||
category: { | ||
type: "text", | ||
fields: { | ||
keyword: { | ||
type: "keyword", | ||
}, | ||
}, | ||
}, | ||
tags: { | ||
type: "text", | ||
fields: { | ||
keyword: { | ||
type: "keyword", | ||
}, | ||
}, | ||
}, | ||
rating: { | ||
type: "float", | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
18 changes: 0 additions & 18 deletions
18
docs/doc_examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
docs/doc_examples/aab810de3314d5e11bd564ea096785b8.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({ | ||
index: "cooking_blog", | ||
query: { | ||
bool: { | ||
filter: [ | ||
{ | ||
term: { | ||
"category.keyword": "Breakfast", | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
16 changes: 16 additions & 0 deletions
16
docs/doc_examples/add82cbe7cd95c4be5ce1c9958f2f208.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.search({ | ||
index: "cooking_blog", | ||
query: { | ||
multi_match: { | ||
query: "vegetarian curry", | ||
fields: ["title^3", "description^2", "tags"], | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
Oops, something went wrong.