Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const response1 = await client.cluster.putComponentTemplate({
type: "keyword",
script: {
source:
"emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))",
"emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ENGLISH))",
},
},
},
Expand Down
12 changes: 12 additions & 0 deletions docs/doc_examples/01cd0ea360282a2c591a366679d7187d.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// 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.tasks.list({
human: "true",
detailed: "true",
actions: "indices:data/write/bulk",
});
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[source, js]
----
const response = await client.indices.create({
index: "my-index-000002",
index: "my-index-000003",
mappings: {
properties: {
metrics: {
Expand All @@ -29,7 +29,7 @@ const response = await client.indices.create({
console.log(response);
const response1 = await client.indices.getMapping({
index: "my-index-000002",
index: "my-index-000003",
});
console.log(response1);
----
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[source, js]
----
const response = await client.ingest.putPipeline({
id: "alibabacloud_ai_search_embeddings",
id: "alibabacloud_ai_search_embeddings_pipeline",
processors: [
{
inference: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const response = await client.inference.put({
min_number_of_allocations: 3,
max_number_of_allocations: 10,
},
num_threads: 1,
model_id: ".multilingual-e5-small",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const response = await client.search({
type: "keyword",
script: {
source:
"emit(doc['@timestamp'].value.dayOfWeekEnum\n .getDisplayName(TextStyle.FULL, Locale.ROOT))",
"emit(doc['@timestamp'].value.dayOfWeekEnum\n .getDisplayName(TextStyle.FULL, Locale.ENGLISH))",
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[source, js]
----
const response = await client.ingest.putPipeline({
id: "hugging_face_embeddings",
id: "hugging_face_embeddings_pipeline",
processors: [
{
inference: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[source, js]
----
const response = await client.ingest.putPipeline({
id: "google_vertex_ai_embeddings",
id: "google_vertex_ai_embeddings_pipeline",
processors: [
{
inference: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const response = await client.search({
"date.day_of_week": {
type: "keyword",
script:
"emit(doc['date'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))",
"emit(doc['date'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ENGLISH))",
},
},
aggs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const response = await client.reindex({
},
dest: {
index: "azure-ai-studio-embeddings",
pipeline: "azure_ai_studio_embeddings",
pipeline: "azure_ai_studio_embeddings_pipeline",
},
});
console.log(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[source, js]
----
const response = await client.ingest.putPipeline({
id: "azure_ai_studio_embeddings",
id: "azure_ai_studio_embeddings_pipeline",
processors: [
{
inference: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const response = await client.reindex({
},
dest: {
index: "openai-embeddings",
pipeline: "openai_embeddings",
pipeline: "openai_embeddings_pipeline",
},
});
console.log(response);
Expand Down
8 changes: 8 additions & 0 deletions docs/doc_examples/3a489743e49902df38e3368cae00717a.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// 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.nodes.hotThreads();
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const response = await client.reindex({
},
dest: {
index: "amazon-bedrock-embeddings",
pipeline: "amazon_bedrock_embeddings",
pipeline: "amazon_bedrock_embeddings_pipeline",
},
});
console.log(response);
Expand Down
18 changes: 18 additions & 0 deletions docs/doc_examples/43d9e314431336a6f084cea76dfd6489.asciidoc
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: "restaurants",
retriever: {
knn: {
field: "vector",
query_vector: [10, 22, 77],
k: 10,
num_candidates: 10,
},
},
});
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const response = await client.search({
type: "keyword",
script: {
source:
"emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))",
"emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ENGLISH))",
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[source, js]
----
const response = await client.ingest.putPipeline({
id: "openai_embeddings",
id: "openai_embeddings_pipeline",
processors: [
{
inference: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const response = await client.reindex({
},
dest: {
index: "elser-embeddings",
pipeline: "elser_embeddings",
pipeline: "elser_embeddings_pipeline",
},
});
console.log(response);
Expand Down
11 changes: 11 additions & 0 deletions docs/doc_examples/4f6694ef147a73b1163bde3c13779d26.asciidoc
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.nodes.stats({
human: "true",
filter_path: "nodes.*.indexing_pressure",
});
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[source, js]
----
const response = await client.ingest.putPipeline({
id: "cohere_embeddings",
id: "cohere_embeddings_pipeline",
processors: [
{
inference: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const response = await client.reindex({
},
dest: {
index: "hugging-face-embeddings",
pipeline: "hugging_face_embeddings",
pipeline: "hugging_face_embeddings_pipeline",
},
});
console.log(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const response = await client.inference.put({
min_number_of_allocations: 3,
max_number_of_allocations: 10,
},
num_threads: 1,
},
},
});
Expand Down
19 changes: 19 additions & 0 deletions docs/doc_examples/58f6b72009512851843c7b7a20e9504a.asciidoc
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.indices.create({
index: "my-index-000002",
mappings: {
properties: {
inference_field: {
type: "semantic_text",
inference_id: "my-elser-endpoint-for-ingest",
search_inference_id: "my-elser-endpoint-for-search",
},
},
},
});
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

[source, js]
----
const response = await client.nodes.hotThreads({
node_id: "my-node,my-other-node",
const response = await client.nodes.stats({
metric: "breaker",
});
console.log(response);
----
19 changes: 19 additions & 0 deletions docs/doc_examples/69541f0bb81ab3797926bb2a00607cda.asciidoc
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.inference.put({
task_type: "rerank",
inference_id: "my-msmarco-minilm-model",
inference_config: {
service: "elasticsearch",
service_settings: {
num_allocations: 1,
num_threads: 1,
model_id: "cross-encoder__ms-marco-minilm-l-6-v2",
},
},
});
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const response = await client.reindex({
},
dest: {
index: "google-vertex-ai-embeddings",
pipeline: "google_vertex_ai_embeddings",
pipeline: "google_vertex_ai_embeddings_pipeline",
},
});
console.log(response);
Expand Down
45 changes: 45 additions & 0 deletions docs/doc_examples/6e6b78e6b689a5d6aa637271b6d084e2.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// 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: "movies",
retriever: {
rrf: {
retrievers: [
{
standard: {
query: {
sparse_vector: {
field: "plot_embedding",
inference_id: "my-elser-model",
query: "films that explore psychological depths",
},
},
},
},
{
standard: {
query: {
multi_match: {
query: "crime",
fields: ["plot", "title"],
},
},
},
},
{
knn: {
field: "vector",
query_vector: [10, 22, 77],
k: 10,
num_candidates: 10,
},
},
],
},
},
});
console.log(response);
----
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const response = await client.search({
filter: {
range: {
price: {
to: "500",
lte: "500",
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const response = await client.reindex({
},
dest: {
index: "cohere-embeddings",
pipeline: "cohere_embeddings",
pipeline: "cohere_embeddings_pipeline",
},
});
console.log(response);
Expand Down
51 changes: 51 additions & 0 deletions docs/doc_examples/7b1b947bddd7e78f77da265f7e645a61.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// 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-000004",
mappings: {
properties: {
metrics: {
subobjects: "auto",
properties: {
time: {
type: "object",
properties: {
min: {
type: "long",
},
},
},
to: {
type: "object",
properties: {
inner_metrics: {
type: "object",
subobjects: "auto",
properties: {
time: {
type: "object",
properties: {
max: {
type: "long",
},
},
},
},
},
},
},
},
},
},
},
});
console.log(response);
const response1 = await client.indices.getMapping({
index: "my-index-000004",
});
console.log(response1);
----
Loading
Loading