You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use a service other than ELSER, you must create an {infer} endpoint using the <<put-inference-api>> and reference it when setting up `semantic_text` as the following example demonstrates:
<1> The task type is `sparse_embedding` in the path as the `elser` service will
50
-
be used and ELSER creates sparse vectors. The `inference_id` is
51
-
`my-elser-endpoint`.
52
-
<2> The `elser` service is used in this example.
53
-
<3> This setting enables and configures {ml-docs}/ml-nlp-auto-scale.html#nlp-model-adaptive-allocations[adaptive allocations].
54
-
Adaptive allocations make it possible for ELSER to automatically scale up or down resources based on the current load on the process.
55
-
56
-
[NOTE]
57
-
====
58
-
You might see a 502 bad gateway error in the response when using the {kib} Console.
59
-
This error usually just reflects a timeout, while the model downloads in the background.
60
-
You can check the download progress in the {ml-app} UI.
61
-
If using the Python client, you can set the `timeout` parameter to a higher value.
62
-
====
63
27
64
28
[discrete]
65
29
[[semantic-text-index-mapping]]
@@ -75,8 +39,7 @@ PUT semantic-embeddings
75
39
"mappings": {
76
40
"properties": {
77
41
"content": { <1>
78
-
"type": "semantic_text", <2>
79
-
"inference_id": "my-elser-endpoint" <3>
42
+
"type": "semantic_text" <2>
80
43
}
81
44
}
82
45
}
@@ -85,19 +48,15 @@ PUT semantic-embeddings
85
48
// TEST[skip:TBD]
86
49
<1> The name of the field to contain the generated embeddings.
87
50
<2> The field to contain the embeddings is a `semantic_text` field.
88
-
<3> The `inference_id` is the inference endpoint you created in the previous step.
89
-
It will be used to generate the embeddings based on the input text.
90
-
Every time you ingest data into the related `semantic_text` field, this endpoint will be used for creating the vector representation of the text.
51
+
Since no `inference_id` is provided, the <<infer-service-elser,ELSER service>> is used by default.
52
+
To use a different {infer} service, you must create an {infer} endpoint first using the <<put-inference-api>> and then specify it in the `semantic_text` field mapping using the `inference_id` parameter.
91
53
92
54
93
55
[NOTE]
94
56
====
95
-
If you're using web crawlers or connectors to generate indices, you have to
96
-
<<indices-put-mapping,update the index mappings>> for these indices to
97
-
include the `semantic_text` field. Once the mapping is updated, you'll need to run
98
-
a full web crawl or a full connector sync. This ensures that all existing
99
-
documents are reprocessed and updated with the new semantic embeddings,
100
-
enabling semantic search on the updated data.
57
+
If you're using web crawlers or connectors to generate indices, you have to <<indices-put-mapping,update the index mappings>> for these indices to include the `semantic_text` field.
58
+
Once the mapping is updated, you'll need to run a full web crawl or a full connector sync.
59
+
This ensures that all existing documents are reprocessed and updated with the new semantic embeddings, enabling semantic search on the updated data.
101
60
====
102
61
103
62
@@ -282,4 +241,4 @@ query from the `semantic-embedding` index:
282
241
283
242
* 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.
284
243
* 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.
244
+
* To learn more about model autoscaling, refer to the {ml-docs}/ml-nlp-auto-scale.html[trained model autoscaling] page.
0 commit comments