Auto-generated code for 8.15 (#2424)
This commit is contained in:
18
docs/doc_examples/0c8be7aec84ea86b243904f5d4162f5a.asciidoc
Normal file
18
docs/doc_examples/0c8be7aec84ea86b243904f5d4162f5a.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.search({
|
||||
index: "cooking_blog",
|
||||
query: {
|
||||
match: {
|
||||
title: {
|
||||
query: "fluffy pancakes breakfast",
|
||||
minimum_should_match: 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -1,18 +0,0 @@
|
||||
// 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-000002",
|
||||
mappings: {
|
||||
properties: {
|
||||
datetime: {
|
||||
type: "date",
|
||||
format: "uuuu/MM/dd HH:mm:ss||uuuu/MM/dd||epoch_millis",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
55
docs/doc_examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc
Normal file
55
docs/doc_examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc
Normal file
@ -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);
|
||||
----
|
||||
@ -9,6 +9,7 @@ const response = await client.indices.create({
|
||||
properties: {
|
||||
inference_field: {
|
||||
type: "semantic_text",
|
||||
inference_id: "my-elser-endpoint",
|
||||
},
|
||||
},
|
||||
},
|
||||
42
docs/doc_examples/49a19615ebe2c013b8321152163478ab.asciidoc
Normal file
42
docs/doc_examples/49a19615ebe2c013b8321152163478ab.asciidoc
Normal file
@ -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
docs/doc_examples/58dd26afc919722e21358c91e112b27a.asciidoc
Normal file
18
docs/doc_examples/58dd26afc919722e21358c91e112b27a.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.search({
|
||||
index: "cooking_blog",
|
||||
query: {
|
||||
range: {
|
||||
date: {
|
||||
gte: "2023-05-01",
|
||||
lte: "2023-05-31",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -4,7 +4,7 @@
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.create({
|
||||
index: "my-index-000003",
|
||||
index: "my-index-000002",
|
||||
mappings: {
|
||||
properties: {
|
||||
inference_field: {
|
||||
18
docs/doc_examples/77082b1ffaae9ac52dfc133fa597baa7.asciidoc
Normal file
18
docs/doc_examples/77082b1ffaae9ac52dfc133fa597baa7.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.search({
|
||||
index: "cooking_blog",
|
||||
query: {
|
||||
match: {
|
||||
description: {
|
||||
query: "fluffy pancakes",
|
||||
operator: "and",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -1,23 +0,0 @@
|
||||
// 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.updateAliases({
|
||||
actions: [
|
||||
{
|
||||
remove: {
|
||||
index: "my-index-000001",
|
||||
alias: "my-index",
|
||||
},
|
||||
},
|
||||
{
|
||||
add: {
|
||||
index: "my-index-000002",
|
||||
alias: "my-index",
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
17
docs/doc_examples/7db798942cf2d334456e30ef5fcb801b.asciidoc
Normal file
17
docs/doc_examples/7db798942cf2d334456e30ef5fcb801b.asciidoc
Normal file
@ -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);
|
||||
----
|
||||
@ -3,10 +3,12 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.putSettings({
|
||||
index: "my-index-000001",
|
||||
settings: {
|
||||
"index.merge.policy.max_merge_at_once_explicit": null,
|
||||
const response = await client.search({
|
||||
index: "cooking_blog",
|
||||
query: {
|
||||
term: {
|
||||
"author.keyword": "Maria Rodriguez",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
61
docs/doc_examples/8d05862be1f9e7edaba162b1888b5677.asciidoc
Normal file
61
docs/doc_examples/8d05862be1f9e7edaba162b1888b5677.asciidoc
Normal file
@ -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);
|
||||
----
|
||||
@ -1,18 +0,0 @@
|
||||
// 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-000002",
|
||||
mappings: {
|
||||
properties: {
|
||||
inference_field: {
|
||||
type: "semantic_text",
|
||||
inference_id: "my-openai-endpoint",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
21
docs/doc_examples/aab810de3314d5e11bd564ea096785b8.asciidoc
Normal file
21
docs/doc_examples/aab810de3314d5e11bd564ea096785b8.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({
|
||||
index: "cooking_blog",
|
||||
query: {
|
||||
bool: {
|
||||
filter: [
|
||||
{
|
||||
term: {
|
||||
"category.keyword": "Breakfast",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
16
docs/doc_examples/add82cbe7cd95c4be5ce1c9958f2f208.asciidoc
Normal file
16
docs/doc_examples/add82cbe7cd95c4be5ce1c9958f2f208.asciidoc
Normal file
@ -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);
|
||||
----
|
||||
88
docs/doc_examples/bb5a67e3d2d9cd3016e487e627769fe8.asciidoc
Normal file
88
docs/doc_examples/bb5a67e3d2d9cd3016e487e627769fe8.asciidoc
Normal file
@ -0,0 +1,88 @@
|
||||
// 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({
|
||||
index: "cooking_blog",
|
||||
refresh: "wait_for",
|
||||
operations: [
|
||||
{
|
||||
index: {
|
||||
_id: "1",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Perfect Pancakes: A Fluffy Breakfast Delight",
|
||||
description:
|
||||
"Learn the secrets to making the fluffiest pancakes, so amazing you won't believe your tastebuds. This recipe uses buttermilk and a special folding technique to create light, airy pancakes that are perfect for lazy Sunday mornings.",
|
||||
author: "Maria Rodriguez",
|
||||
date: "2023-05-01",
|
||||
category: "Breakfast",
|
||||
tags: ["pancakes", "breakfast", "easy recipes"],
|
||||
rating: 4.8,
|
||||
},
|
||||
{
|
||||
index: {
|
||||
_id: "2",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Spicy Thai Green Curry: A Vegetarian Adventure",
|
||||
description:
|
||||
"Dive into the flavors of Thailand with this vibrant green curry. Packed with vegetables and aromatic herbs, this dish is both healthy and satisfying. Don't worry about the heat - you can easily adjust the spice level to your liking.",
|
||||
author: "Liam Chen",
|
||||
date: "2023-05-05",
|
||||
category: "Main Course",
|
||||
tags: ["thai", "vegetarian", "curry", "spicy"],
|
||||
rating: 4.6,
|
||||
},
|
||||
{
|
||||
index: {
|
||||
_id: "3",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Classic Beef Stroganoff: A Creamy Comfort Food",
|
||||
description:
|
||||
"Indulge in this rich and creamy beef stroganoff. Tender strips of beef in a savory mushroom sauce, served over a bed of egg noodles. It's the ultimate comfort food for chilly evenings.",
|
||||
author: "Emma Watson",
|
||||
date: "2023-05-10",
|
||||
category: "Main Course",
|
||||
tags: ["beef", "pasta", "comfort food"],
|
||||
rating: 4.7,
|
||||
},
|
||||
{
|
||||
index: {
|
||||
_id: "4",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Vegan Chocolate Avocado Mousse",
|
||||
description:
|
||||
"Discover the magic of avocado in this rich, vegan chocolate mousse. Creamy, indulgent, and secretly healthy, it's the perfect guilt-free dessert for chocolate lovers.",
|
||||
author: "Alex Green",
|
||||
date: "2023-05-15",
|
||||
category: "Dessert",
|
||||
tags: ["vegan", "chocolate", "avocado", "healthy dessert"],
|
||||
rating: 4.5,
|
||||
},
|
||||
{
|
||||
index: {
|
||||
_id: "5",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Crispy Oven-Fried Chicken",
|
||||
description:
|
||||
"Get that perfect crunch without the deep fryer! This oven-fried chicken recipe delivers crispy, juicy results every time. A healthier take on the classic comfort food.",
|
||||
author: "Maria Rodriguez",
|
||||
date: "2023-05-20",
|
||||
category: "Main Course",
|
||||
tags: ["chicken", "oven-fried", "healthy"],
|
||||
rating: 4.9,
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
16
docs/doc_examples/bc01aee2ab2ce1690986374bd836e1c7.asciidoc
Normal file
16
docs/doc_examples/bc01aee2ab2ce1690986374bd836e1c7.asciidoc
Normal file
@ -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", "description", "tags"],
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -9,6 +9,7 @@ const response = await client.indices.create({
|
||||
properties: {
|
||||
content: {
|
||||
type: "semantic_text",
|
||||
inference_id: "my-elser-endpoint",
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -3,13 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.reindex({
|
||||
source: {
|
||||
index: "my-index-000001",
|
||||
},
|
||||
dest: {
|
||||
index: "my-index-000002",
|
||||
},
|
||||
const response = await client.indices.create({
|
||||
index: "cooking_blog",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -4667,9 +4667,9 @@ export interface AnalysisNGramTokenFilter extends AnalysisTokenFilterBase {
|
||||
export interface AnalysisNGramTokenizer extends AnalysisTokenizerBase {
|
||||
type: 'ngram'
|
||||
custom_token_chars?: string
|
||||
max_gram: integer
|
||||
min_gram: integer
|
||||
token_chars: AnalysisTokenChar[]
|
||||
max_gram?: integer
|
||||
min_gram?: integer
|
||||
token_chars?: AnalysisTokenChar[]
|
||||
}
|
||||
|
||||
export interface AnalysisNoriAnalyzer {
|
||||
|
||||
@ -4740,9 +4740,9 @@ export interface AnalysisNGramTokenFilter extends AnalysisTokenFilterBase {
|
||||
export interface AnalysisNGramTokenizer extends AnalysisTokenizerBase {
|
||||
type: 'ngram'
|
||||
custom_token_chars?: string
|
||||
max_gram: integer
|
||||
min_gram: integer
|
||||
token_chars: AnalysisTokenChar[]
|
||||
max_gram?: integer
|
||||
min_gram?: integer
|
||||
token_chars?: AnalysisTokenChar[]
|
||||
}
|
||||
|
||||
export interface AnalysisNoriAnalyzer {
|
||||
|
||||
Reference in New Issue
Block a user