From 776c32e3849a54b65e9b35cfd60ef1f03824375e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Fri, 20 Sep 2024 11:31:04 +0200 Subject: [PATCH] [DOCS] Fixes adaptive_allocations examples (#113248) Co-authored-by: Jan Kuipers <148754765+jan-elastic@users.noreply.github.com> --- docs/reference/inference/service-elasticsearch.asciidoc | 1 + docs/reference/inference/service-elser.asciidoc | 3 ++- .../semantic-search-semantic-text.asciidoc | 8 +++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/reference/inference/service-elasticsearch.asciidoc b/docs/reference/inference/service-elasticsearch.asciidoc index 572cad591fba6..efa0c78b8356f 100644 --- a/docs/reference/inference/service-elasticsearch.asciidoc +++ b/docs/reference/inference/service-elasticsearch.asciidoc @@ -179,6 +179,7 @@ PUT _inference/text_embedding/my-e5-model "min_number_of_allocations": 3, "max_number_of_allocations": 10 }, + "num_threads": 1, "model_id": ".multilingual-e5-small" } } diff --git a/docs/reference/inference/service-elser.asciidoc b/docs/reference/inference/service-elser.asciidoc index fdce94901984b..c7217f38d459b 100644 --- a/docs/reference/inference/service-elser.asciidoc +++ b/docs/reference/inference/service-elser.asciidoc @@ -147,7 +147,8 @@ PUT _inference/sparse_embedding/my-elser-model "enabled": true, "min_number_of_allocations": 3, "max_number_of_allocations": 10 - } + }, + "num_threads": 1 } } ------------------------------------------------------------ diff --git a/docs/reference/search/search-your-data/semantic-search-semantic-text.asciidoc b/docs/reference/search/search-your-data/semantic-search-semantic-text.asciidoc index 709d17091164c..de9a35e0d29b8 100644 --- a/docs/reference/search/search-your-data/semantic-search-semantic-text.asciidoc +++ b/docs/reference/search/search-your-data/semantic-search-semantic-text.asciidoc @@ -36,7 +36,11 @@ PUT _inference/sparse_embedding/my-elser-endpoint <1> { "service": "elser", <2> "service_settings": { - "num_allocations": 1, + "adaptive_allocations": { <3> + "enabled": true, + "min_number_of_allocations": 3, + "max_number_of_allocations": 10 + }, "num_threads": 1 } } @@ -46,6 +50,8 @@ PUT _inference/sparse_embedding/my-elser-endpoint <1> be used and ELSER creates sparse vectors. The `inference_id` is `my-elser-endpoint`. <2> The `elser` service is used in this example. +<3> This setting enables and configures {ml-docs}/ml-nlp-elser.html#elser-adaptive-allocations[adaptive allocations]. +Adaptive allocations make it possible for ELSER to automatically scale up or down resources based on the current load on the process. [NOTE] ====