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:
Copy file name to clipboardExpand all lines: docs/reference/search/search-your-data/semantic-search-semantic-text.asciidoc
+8-49Lines changed: 8 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,45 +21,9 @@ This tutorial uses the <<inference-example-elser,`elser` service>> for demonstra
21
21
[[semantic-text-requirements]]
22
22
==== Requirements
23
23
24
-
To use the `semantic_text` field type, you must have an {infer} endpoint deployed in
25
-
your cluster using the <<put-inference-api>>.
24
+
To use the `semantic_text` field type with an {infer} service other than ELSER, you must have an {infer} endpoint deployed in your cluster using the <<put-inference-api>>.
25
+
If you use ELSER, the {infer} endpoint will be created automatically, when you set up the index with the `semantic_text` field.
26
26
27
-
[discrete]
28
-
[[semantic-text-infer-endpoint]]
29
-
==== Create the {infer} endpoint
30
-
31
-
Create an inference endpoint by using the <<put-inference-api>>:
<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 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,18 +48,14 @@ 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
+
As there is no `inference_id` provided, the <<infer-service-elser,ELSER serive>> will be used by default.
52
+
If you use a different {infer} service, you must create an {infer} endpoint first and then reference it in the `semantic_text` field mapping.
91
53
92
54
[NOTE]
93
55
====
94
-
If you're using web crawlers or connectors to generate indices, you have to
95
-
<<indices-put-mapping,update the index mappings>> for these indices to
96
-
include the `semantic_text` field. Once the mapping is updated, you'll need to run
97
-
a full web crawl or a full connector sync. This ensures that all existing
98
-
documents are reprocessed and updated with the new semantic embeddings,
99
-
enabling semantic search on the updated data.
56
+
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.
57
+
Once the mapping is updated, you'll need to run a full web crawl or a full connector sync.
58
+
This ensures that all existing documents are reprocessed and updated with the new semantic embeddings, enabling semantic search on the updated data.
0 commit comments