From e934e216da99faf3e79efc5a6ed668cf8d78877f Mon Sep 17 00:00:00 2001 From: eshaffer321 Date: Mon, 2 Dec 2024 06:04:51 -0700 Subject: [PATCH 1/4] Add deprecation warning for ELSER in semantic search tutorial MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a deprecation warning to the “Tutorial: semantic search with semantic_text” to inform users that the elser service is deprecated as of version 8.16 and will be removed in a future release. The warning advises users to use the Elasticsearch inference service with model_id in service_settings instead. This update aligns the tutorial with the existing deprecation notice on the ELSER documentation page, ensuring clarity for users following the tutorial. --- .../semantic-search-semantic-text.asciidoc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 6c3f3b2128740..3b7d7525db398 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 @@ -6,6 +6,13 @@ beta[] +[WARNING] +.Deprecated in 8.16 +==== +The elser service is deprecated and will be removed in a future release. +Use the <> instead, with model_id included in the service_settings. +==== + This tutorial shows you how to use the semantic text feature to perform semantic search on your data. Semantic text simplifies the {infer} workflow by providing {infer} at ingestion time and sensible default values automatically. @@ -282,4 +289,4 @@ query from the `semantic-embedding` index: * If you want to use `semantic_text` in hybrid search, refer to https://colab.research.google.com/github/elastic/elasticsearch-labs/blob/main/notebooks/search/09-semantic-text.ipynb[this notebook] for a step-by-step guide. * For more information on how to optimize your ELSER endpoints, refer to {ml-docs}/ml-nlp-elser.html#elser-recommendations[the ELSER recommendations] section in the model documentation. -* To learn more about model autoscaling, refer to the {ml-docs}/ml-nlp-auto-scale.html[trained model autoscaling] page. \ No newline at end of file +* To learn more about model autoscaling, refer to the {ml-docs}/ml-nlp-auto-scale.html[trained model autoscaling] page. From 948639b22203dd1b0cb93bf63813b545ecad6d64 Mon Sep 17 00:00:00 2001 From: Erick Shaffer Date: Mon, 2 Dec 2024 07:07:06 -0700 Subject: [PATCH 2/4] add changelog entry --- docs/changelog/117826.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/changelog/117826.yaml diff --git a/docs/changelog/117826.yaml b/docs/changelog/117826.yaml new file mode 100644 index 0000000000000..4a4202f99806c --- /dev/null +++ b/docs/changelog/117826.yaml @@ -0,0 +1,5 @@ +pr: 117826 +summary: "Add deprecation warning for ELSER in semantic search tutorial" +area: Docs +type: doc +issues: ["117829"] From 50a3d566d5eeee8bf86b2e3f7b8e6d75154c888c Mon Sep 17 00:00:00 2001 From: Erick Shaffer Date: Tue, 3 Dec 2024 05:02:06 -0700 Subject: [PATCH 3/4] Removing warning, update tutorial to use elasticsearch service --- .../semantic-search-semantic-text.asciidoc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) 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 3b7d7525db398..3d799cd68f1b9 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 @@ -6,13 +6,6 @@ beta[] -[WARNING] -.Deprecated in 8.16 -==== -The elser service is deprecated and will be removed in a future release. -Use the <> instead, with model_id included in the service_settings. -==== - This tutorial shows you how to use the semantic text feature to perform semantic search on your data. Semantic text simplifies the {infer} workflow by providing {infer} at ingestion time and sensible default values automatically. @@ -21,7 +14,7 @@ You don't need to define model related settings and parameters, or create {infer The recommended way to use <> in the {stack} is following the `semantic_text` workflow. When you need more control over indexing and query settings, you can still use the complete {infer} workflow (refer to <> to review the process). -This tutorial uses the <> for demonstration, but you can use any service and their supported models offered by the {infer-cap} API. +This tutorial uses the <> for demonstration, but you can use any service and their supported models offered by the {infer-cap} API. [discrete] @@ -41,14 +34,15 @@ Create an inference endpoint by using the <>: ------------------------------------------------------------ PUT _inference/sparse_embedding/my-elser-endpoint <1> { - "service": "elser", <2> + "service": "elasticsearch", <2> "service_settings": { "adaptive_allocations": { <3> "enabled": true, "min_number_of_allocations": 3, "max_number_of_allocations": 10 }, - "num_threads": 1 + "num_threads": 1, + "model_id": ".elser_model_2" <4> } } ------------------------------------------------------------ @@ -56,9 +50,12 @@ PUT _inference/sparse_embedding/my-elser-endpoint <1> <1> The task type is `sparse_embedding` in the path as the `elser` service will be used and ELSER creates sparse vectors. The `inference_id` is `my-elser-endpoint`. -<2> The `elser` service is used in this example. +<2> The `elasticsearch` service is used in this example. <3> This setting enables and configures {ml-docs}/ml-nlp-auto-scale.html#nlp-model-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. +<4> The `model_id` must be the ID of one of the built-in ELSER models. +Valid values are `.elser_model_2` and `.elser_model_2_linux-x86_64`. +For further details, refer to the {ml-docs}/ml-nlp-elser.html[ELSER model documentation]. [NOTE] ==== From 4c308e89b9dc75aa19bae6fc613c2b17970c0fa1 Mon Sep 17 00:00:00 2001 From: Max Hniebergall <137079448+maxhniebergall@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:14:15 -0500 Subject: [PATCH 4/4] Update 117826.yaml --- docs/changelog/117826.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog/117826.yaml b/docs/changelog/117826.yaml index 4a4202f99806c..98ca84bc0bd96 100644 --- a/docs/changelog/117826.yaml +++ b/docs/changelog/117826.yaml @@ -1,5 +1,5 @@ pr: 117826 -summary: "Add deprecation warning for ELSER in semantic search tutorial" +summary: "Switch ELSER service to elasticsearch service in semantic search tutorial" area: Docs type: doc issues: ["117829"]