Skip to content

Commit 3a603fe

Browse files
authored
[DOCS] Expands semantic_text docs with new ELSER endpoint (#131751)
* Adds limitations. * Revokes changes. * Addresses feedback. * Addresses feedback.
1 parent 0a85bc3 commit 3a603fe

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

docs/reference/elasticsearch/mapping-reference/semantic-text.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ the embedding generation, indexing, and query to use.
3737
[quantized](/reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-quantization)
3838
to `bbq_hnsw` automatically.
3939

40+
## Default and custom endpoints
41+
42+
You can use either preconfigured endpoints in your `semantic_text` fields which
43+
are ideal for most use cases or create custom endpoints and reference them in
44+
the field mappings.
45+
46+
### Using the default ELSER endpoint
47+
4048
If you use the preconfigured `.elser-2-elasticsearch` endpoint, you can set up
4149
`semantic_text` with the following API request:
4250

@@ -53,6 +61,8 @@ PUT my-index-000001
5361
}
5462
```
5563

64+
### Using a custom endpoint
65+
5666
To use a custom {{infer}} endpoint instead of the default
5767
`.elser-2-elasticsearch`, you
5868
must [Create {{infer}} API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put)
@@ -96,6 +106,35 @@ PUT my-index-000003
96106
}
97107
```
98108

109+
### Using ELSER on EIS
110+
111+
```{applies_to}
112+
stack: preview 9.1
113+
serverless: preview
114+
```
115+
116+
If you use the preconfigured `.elser-2-elastic` endpoint that utilizes the ELSER model as a service through the Elastic Inference Service ([ELSER on EIS](docs-content://explore-analyze/elastic-inference/eis.md#elser-on-eis)), you can
117+
set up `semantic_text` with the following API request:
118+
119+
```console
120+
PUT my-index-000001
121+
{
122+
"mappings": {
123+
"properties": {
124+
"inference_field": {
125+
"type": "semantic_text",
126+
"inference_id": ".elser-2-elastic"
127+
}
128+
}
129+
}
130+
}
131+
```
132+
133+
::::{note}
134+
While we do encourage experimentation, we do not recommend implementing production use cases on top of this feature while it is in Technical Preview.
135+
136+
::::
137+
99138
## Parameters for `semantic_text` fields [semantic-text-params]
100139

101140
`inference_id`

0 commit comments

Comments
 (0)