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
Copy file name to clipboardExpand all lines: solutions/search/semantic-search/semantic-search-semantic-text.md
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,14 +27,15 @@ This tutorial uses the `elasticsearch` service for demonstration, which is creat
27
27
28
28
The mapping of the destination index - the index that contains the embeddings that the inference endpoint will generate based on your input text - must be created. The destination index must have a field with the [`semantic_text`](elasticsearch://reference/elasticsearch/mapping-reference/semantic-text.md) field type to index the output of the used inference endpoint.
29
29
30
-
::::{tab-set}
30
+
:::::::{tab-set}
31
31
32
-
:::{tab-item} Using EIS on Serverless
32
+
::::::{tab-item} Using EIS on Serverless
33
33
34
34
```{applies_to}
35
35
serverless: ga
36
36
```
37
37
38
+
```console
38
39
PUT semantic-embeddings
39
40
{
40
41
"mappings": {
@@ -45,19 +46,22 @@ PUT semantic-embeddings
45
46
}
46
47
}
47
48
}
48
-
:::
49
+
```
49
50
50
51
1. The name of the field to contain the generated embeddings.
51
52
2. The field to contain the embeddings is a `semantic_text` field. Since no `inference_id` is provided, the default endpoint `.elser-2-elastic` for the `elasticsearch` service is used. This {{infer}} endpoint uses the [Elastic {{infer-cap}} Service (EIS)](/explore-analyze/elastic-inference/eis.md).
52
53
53
-
:::{tab-item} Using EIS in Cloud
54
+
::::::
55
+
56
+
::::::{tab-item} Using EIS in Cloud
54
57
55
58
```{applies_to}
56
59
stack: ga
57
60
deployment:
58
61
self: unavailable
59
62
```
60
63
64
+
```console
61
65
PUT semantic-embeddings
62
66
{
63
67
"mappings": {
@@ -69,13 +73,15 @@ PUT semantic-embeddings
69
73
}
70
74
}
71
75
}
72
-
:::
76
+
```
73
77
74
78
1. The name of the field to contain the generated embeddings.
75
79
2. The field to contain the embeddings is a `semantic_text` field.
76
80
3. The `.elser-2-elastic` preconfigured {{infer}} endpoint for the `elasticsearch` service is used. This {{infer}} endpoint uses the [Elastic {{infer-cap}} Service (EIS)](/explore-analyze/elastic-inference/eis.md).
77
81
78
-
:::{tab-item} Using ML-nodes
82
+
::::::
83
+
84
+
::::::{tab-item} Using ML-nodes
79
85
80
86
```console
81
87
PUT semantic-embeddings
@@ -95,9 +101,9 @@ PUT semantic-embeddings
95
101
2. The field to contain the embeddings is a `semantic_text` field.
96
102
3. The `.elser-2-elasticsearch` preconfigured {{infer}} endpoint for the `elasticsearch` service is used. To use a different {{infer}} service, you must create an {{infer}} endpoint first using the [Create {{infer}} API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put) and then specify it in the `semantic_text` field mapping using the `inference_id` parameter.
97
103
98
-
:::
104
+
::::::
99
105
100
-
::::
106
+
:::::::
101
107
102
108
::::{note}
103
109
If you’re using web crawlers or connectors to generate indices, you have to [update the index mappings](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) for these indices to include the `semantic_text` field. Once the mapping is updated, you’ll need to run a full web crawl or a full connector sync. 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