Skip to content

Commit 528ecb8

Browse files
committed
Move example
1 parent 2bed456 commit 528ecb8

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

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

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -117,27 +117,6 @@ for the field. Currently, `dense_vector` index options are supported.
117117
For text embeddings, `index_options` may match any allowed
118118
[dense_vector index options](/reference/elasticsearch/mapping-reference/dense-vector.md#dense-vector-index-options).
119119

120-
An example of how to set index_options for a `semantic_text` field:
121-
122-
```console
123-
PUT my-index-000004
124-
{
125-
"mappings": {
126-
"properties": {
127-
"inference_field": {
128-
"type": "semantic_text",
129-
"inference_id": "my-text-embedding-endpoint",
130-
"index_options": {
131-
"dense_vector": {
132-
"type": "int4_flat"
133-
}
134-
}
135-
}
136-
}
137-
}
138-
}
139-
```
140-
141120
`chunking_settings`
142121
: (Optional, object) Settings for chunking text into smaller passages.
143122
If specified, these will override the chunking settings set in the {{infer-cap}}
@@ -324,6 +303,30 @@ parameters>>:
324303
- Use `chunking_settings` to override the chunking strategy associated with the
325304
{{infer}} endpoint, or completely disable chunking using the `none` type
326305

306+
Here is an example of how to set these parameters for a text embedding endpoint:
307+
308+
```console
309+
PUT my-index-000004
310+
{
311+
"mappings": {
312+
"properties": {
313+
"inference_field": {
314+
"type": "semantic_text",
315+
"inference_id": "my-text-embedding-endpoint",
316+
"index_options": {
317+
"dense_vector": {
318+
"type": "int4_flat"
319+
}
320+
},
321+
"chunking_settings": {
322+
"type": "none"
323+
}
324+
}
325+
}
326+
}
327+
}
328+
```
329+
327330
## Updates to `semantic_text` fields [update-script]
328331

329332
For indices containing `semantic_text` fields, updates that use scripts have the

0 commit comments

Comments
 (0)