From d542c069e83a39b690a02ac3cc1d8a3c79de445a Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Mon, 13 Jan 2025 16:08:26 +0000 Subject: [PATCH] Auto-generated code for 8.15 (#2570) --- .../41d24383d29b2808a65258a0a3256e96.asciidoc | 18 ++++++++ .../5836b09198feb1269ed12839b416123d.asciidoc | 16 +++++++ .../790684b45bef2bb848ea932f0fd0cfbd.asciidoc | 35 ++++++++++++++++ .../9250ac57ec81d5192e8ad4c462438489.asciidoc | 42 +++++++++++++++++++ .../bf3c3bc41c593a80faebef1df353e483.asciidoc | 22 ++++++++++ .../cdb7613b445e6ed6e8b473f9cae1af90.asciidoc | 35 ++++++++++++++++ .../d3672a87a857ddb87519788236e57497.asciidoc | 28 +++++++++++++ .../fff86117c47f974074284644e8a97a99.asciidoc | 18 ++++++++ 8 files changed, 214 insertions(+) create mode 100644 docs/doc_examples/41d24383d29b2808a65258a0a3256e96.asciidoc create mode 100644 docs/doc_examples/5836b09198feb1269ed12839b416123d.asciidoc create mode 100644 docs/doc_examples/790684b45bef2bb848ea932f0fd0cfbd.asciidoc create mode 100644 docs/doc_examples/9250ac57ec81d5192e8ad4c462438489.asciidoc create mode 100644 docs/doc_examples/bf3c3bc41c593a80faebef1df353e483.asciidoc create mode 100644 docs/doc_examples/cdb7613b445e6ed6e8b473f9cae1af90.asciidoc create mode 100644 docs/doc_examples/d3672a87a857ddb87519788236e57497.asciidoc create mode 100644 docs/doc_examples/fff86117c47f974074284644e8a97a99.asciidoc diff --git a/docs/doc_examples/41d24383d29b2808a65258a0a3256e96.asciidoc b/docs/doc_examples/41d24383d29b2808a65258a0a3256e96.asciidoc new file mode 100644 index 000000000..67b3c97a4 --- /dev/null +++ b/docs/doc_examples/41d24383d29b2808a65258a0a3256e96.asciidoc @@ -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.create({ + index: "jinaai-index", + mappings: { + properties: { + content: { + type: "semantic_text", + inference_id: "jinaai-embeddings", + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/5836b09198feb1269ed12839b416123d.asciidoc b/docs/doc_examples/5836b09198feb1269ed12839b416123d.asciidoc new file mode 100644 index 000000000..12ea79855 --- /dev/null +++ b/docs/doc_examples/5836b09198feb1269ed12839b416123d.asciidoc @@ -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: "jinaai-index", + query: { + semantic: { + field: "content", + query: "who inspired taking care of the sea?", + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/790684b45bef2bb848ea932f0fd0cfbd.asciidoc b/docs/doc_examples/790684b45bef2bb848ea932f0fd0cfbd.asciidoc new file mode 100644 index 000000000..d5144150f --- /dev/null +++ b/docs/doc_examples/790684b45bef2bb848ea932f0fd0cfbd.asciidoc @@ -0,0 +1,35 @@ +// 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({ + query: { + intervals: { + my_text: { + all_of: { + ordered: false, + max_gaps: 1, + intervals: [ + { + match: { + query: "my favorite food", + max_gaps: 0, + ordered: true, + }, + }, + { + match: { + query: "cold porridge", + max_gaps: 4, + ordered: true, + }, + }, + ], + }, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/9250ac57ec81d5192e8ad4c462438489.asciidoc b/docs/doc_examples/9250ac57ec81d5192e8ad4c462438489.asciidoc new file mode 100644 index 000000000..8a6e40755 --- /dev/null +++ b/docs/doc_examples/9250ac57ec81d5192e8ad4c462438489.asciidoc @@ -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.bulk({ + index: "jinaai-index", + operations: [ + { + index: { + _index: "jinaai-index", + _id: "1", + }, + }, + { + content: + "Sarah Johnson is a talented marine biologist working at the Oceanographic Institute. Her groundbreaking research on coral reef ecosystems has garnered international attention and numerous accolades.", + }, + { + index: { + _index: "jinaai-index", + _id: "2", + }, + }, + { + content: + "She spends months at a time diving in remote locations, meticulously documenting the intricate relationships between various marine species. ", + }, + { + index: { + _index: "jinaai-index", + _id: "3", + }, + }, + { + content: + "Her dedication to preserving these delicate underwater environments has inspired a new generation of conservationists.", + }, + ], +}); +console.log(response); +---- diff --git a/docs/doc_examples/bf3c3bc41c593a80faebef1df353e483.asciidoc b/docs/doc_examples/bf3c3bc41c593a80faebef1df353e483.asciidoc new file mode 100644 index 000000000..b0b47f121 --- /dev/null +++ b/docs/doc_examples/bf3c3bc41c593a80faebef1df353e483.asciidoc @@ -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.inference.put({ + task_type: "rerank", + inference_id: "jinaai-rerank", + inference_config: { + service: "jinaai", + service_settings: { + api_key: "", + model_id: "jina-reranker-v2-base-multilingual", + }, + task_settings: { + top_n: 10, + return_documents: true, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/cdb7613b445e6ed6e8b473f9cae1af90.asciidoc b/docs/doc_examples/cdb7613b445e6ed6e8b473f9cae1af90.asciidoc new file mode 100644 index 000000000..ee14809f6 --- /dev/null +++ b/docs/doc_examples/cdb7613b445e6ed6e8b473f9cae1af90.asciidoc @@ -0,0 +1,35 @@ +// 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({ + query: { + intervals: { + my_text: { + all_of: { + ordered: true, + max_gaps: 1, + intervals: [ + { + match: { + query: "my favorite food", + max_gaps: 0, + ordered: true, + }, + }, + { + match: { + query: "cold porridge", + max_gaps: 4, + ordered: true, + }, + }, + ], + }, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/d3672a87a857ddb87519788236e57497.asciidoc b/docs/doc_examples/d3672a87a857ddb87519788236e57497.asciidoc new file mode 100644 index 000000000..dad59f975 --- /dev/null +++ b/docs/doc_examples/d3672a87a857ddb87519788236e57497.asciidoc @@ -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({ + index: "jinaai-index", + retriever: { + text_similarity_reranker: { + retriever: { + standard: { + query: { + semantic: { + field: "content", + query: "who inspired taking care of the sea?", + }, + }, + }, + }, + field: "content", + rank_window_size: 100, + inference_id: "jinaai-rerank", + inference_text: "who inspired taking care of the sea?", + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/fff86117c47f974074284644e8a97a99.asciidoc b/docs/doc_examples/fff86117c47f974074284644e8a97a99.asciidoc new file mode 100644 index 000000000..339435f69 --- /dev/null +++ b/docs/doc_examples/fff86117c47f974074284644e8a97a99.asciidoc @@ -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.inference.put({ + task_type: "text_embedding", + inference_id: "jinaai-embeddings", + inference_config: { + service: "jinaai", + service_settings: { + model_id: "jina-embeddings-v3", + api_key: "", + }, + }, +}); +console.log(response); +----