-
Notifications
You must be signed in to change notification settings - Fork 729
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 main (#2384)
- Loading branch information
1 parent
20ac2a6
commit a7123f8
Showing
93 changed files
with
2,023 additions
and
438 deletions.
There are no files selected for viewing
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
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
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/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); | ||
---- |
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
21 changes: 21 additions & 0 deletions
21
docs/doc_examples/0e31b8ad176b31028becf9500989bcbd.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.inference.put({ | ||
task_type: "text_embedding", | ||
inference_id: "watsonx-embeddings", | ||
inference_config: { | ||
service: "watsonxai", | ||
service_settings: { | ||
api_key: "<api_key>", | ||
url: "<url>", | ||
model_id: "ibm/slate-30m-english-rtrvr", | ||
project_id: "<project_id>", | ||
api_version: "2024-03-14", | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
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); | ||
---- |
19 changes: 19 additions & 0 deletions
19
docs/doc_examples/1a7483796087053ba55029d0dc2ab356.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,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.index({ | ||
index: "mv", | ||
refresh: "true", | ||
document: { | ||
a: [2, null, 1], | ||
}, | ||
}); | ||
console.log(response); | ||
const response1 = await client.esql.query({ | ||
query: "FROM mv | LIMIT 1", | ||
}); | ||
console.log(response1); | ||
---- |
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
77 changes: 77 additions & 0 deletions
77
docs/doc_examples/2c079d1ae4819a0c206b9e1aa5623523.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,77 @@ | ||
// 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-000001", | ||
mappings: { | ||
properties: { | ||
attributes: { | ||
type: "passthrough", | ||
priority: 10, | ||
properties: { | ||
id: { | ||
type: "keyword", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
const response1 = await client.index({ | ||
index: "my-index-000001", | ||
id: 1, | ||
document: { | ||
attributes: { | ||
id: "foo", | ||
zone: 10, | ||
}, | ||
}, | ||
}); | ||
console.log(response1); | ||
const response2 = await client.search({ | ||
index: "my-index-000001", | ||
query: { | ||
bool: { | ||
must: [ | ||
{ | ||
match: { | ||
id: "foo", | ||
}, | ||
}, | ||
{ | ||
match: { | ||
zone: 10, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}); | ||
console.log(response2); | ||
const response3 = await client.search({ | ||
index: "my-index-000001", | ||
query: { | ||
bool: { | ||
must: [ | ||
{ | ||
match: { | ||
"attributes.id": "foo", | ||
}, | ||
}, | ||
{ | ||
match: { | ||
"attributes.zone": 10, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}); | ||
console.log(response3); | ||
---- |
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
16 changes: 16 additions & 0 deletions
16
docs/doc_examples/40f287bf733420bbab134b74c7d0ea5d.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.index({ | ||
index: "amazon-reviews", | ||
id: 1, | ||
document: { | ||
review_text: | ||
"This product is lifechanging! I'm telling all my friends about it.", | ||
review_vector: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8], | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
14 changes: 14 additions & 0 deletions
14
docs/doc_examples/4b91ad7c9b44e07db4a4e81390f19ad3.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,14 @@ | ||
// 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.inference.streamInference({ | ||
task_type: "completion", | ||
inference_id: "openai-completion", | ||
body: { | ||
input: "What is Elastic?", | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
32 changes: 32 additions & 0 deletions
32
docs/doc_examples/55085e6a2891040b6ac696561d0787c8.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,32 @@ | ||
// 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: { | ||
attributes: { | ||
type: "passthrough", | ||
priority: 10, | ||
properties: { | ||
id: { | ||
type: "keyword", | ||
}, | ||
}, | ||
}, | ||
"resource.attributes": { | ||
type: "passthrough", | ||
priority: 20, | ||
properties: { | ||
id: { | ||
type: "keyword", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
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
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/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); | ||
---- |
Oops, something went wrong.