Skip to content

Commit 73b1418

Browse files
Update Semantic Search Tutorial to Use Elasticsearch Service and Remove References to Deprecated ELSER Service (#117826)
* Update tutorial to use elasticsearch service --------- Co-authored-by: Max Hniebergall <[email protected]>
1 parent f7b9731 commit 73b1418

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

docs/changelog/117826.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 117826
2+
summary: "Switch ELSER service to elasticsearch service in semantic search tutorial"
3+
area: Docs
4+
type: doc
5+
issues: ["117829"]

docs/reference/search/search-your-data/semantic-search-semantic-text.asciidoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You don't need to define model related settings and parameters, or create {infer
1414
The recommended way to use <<semantic-search,semantic search>> in the {stack} is following the `semantic_text` workflow.
1515
When you need more control over indexing and query settings, you can still use the complete {infer} workflow (refer to <<semantic-search-inference,this tutorial>> to review the process).
1616

17-
This tutorial uses the <<inference-example-elser,`elser` service>> for demonstration, but you can use any service and their supported models offered by the {infer-cap} API.
17+
This tutorial uses the <<inference-example-elasticsearch-elser,`elasticsearch` service>> for demonstration, but you can use any service and their supported models offered by the {infer-cap} API.
1818

1919

2020
[discrete]
@@ -34,24 +34,28 @@ Create an inference endpoint by using the <<put-inference-api>>:
3434
------------------------------------------------------------
3535
PUT _inference/sparse_embedding/my-elser-endpoint <1>
3636
{
37-
"service": "elser", <2>
37+
"service": "elasticsearch", <2>
3838
"service_settings": {
3939
"adaptive_allocations": { <3>
4040
"enabled": true,
4141
"min_number_of_allocations": 3,
4242
"max_number_of_allocations": 10
4343
},
44-
"num_threads": 1
44+
"num_threads": 1,
45+
"model_id": ".elser_model_2" <4>
4546
}
4647
}
4748
------------------------------------------------------------
4849
// TEST[skip:TBD]
4950
<1> The task type is `sparse_embedding` in the path as the `elser` service will
5051
be used and ELSER creates sparse vectors. The `inference_id` is
5152
`my-elser-endpoint`.
52-
<2> The `elser` service is used in this example.
53+
<2> The `elasticsearch` service is used in this example.
5354
<3> This setting enables and configures {ml-docs}/ml-nlp-auto-scale.html#nlp-model-adaptive-allocations[adaptive allocations].
5455
Adaptive allocations make it possible for ELSER to automatically scale up or down resources based on the current load on the process.
56+
<4> The `model_id` must be the ID of one of the built-in ELSER models.
57+
Valid values are `.elser_model_2` and `.elser_model_2_linux-x86_64`.
58+
For further details, refer to the {ml-docs}/ml-nlp-elser.html[ELSER model documentation].
5559

5660
[NOTE]
5761
====
@@ -282,4 +286,4 @@ query from the `semantic-embedding` index:
282286

283287
* 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.
284288
* 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.
285-
* To learn more about model autoscaling, refer to the {ml-docs}/ml-nlp-auto-scale.html[trained model autoscaling] page.
289+
* To learn more about model autoscaling, refer to the {ml-docs}/ml-nlp-auto-scale.html[trained model autoscaling] page.

0 commit comments

Comments
 (0)