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: docs/reference/mapping/types/semantic-text.asciidoc
+40-9Lines changed: 40 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,11 @@ You can update this parameter by using the <<indices-put-mapping, Update mapping
96
96
Use the <<put-inference-api>> to create the endpoint.
97
97
If not specified, the {infer} endpoint defined by `inference_id` will be used at both index and query time.
98
98
99
+
`index_options`::
100
+
(Optional, object) Specifies the index options to override default values for the field.
101
+
Currently, `dense_vector` index options are supported.
102
+
For text embeddings, `index_options` may match any allowed <<dense-vector-index-options,dense vector index options>>.
103
+
99
104
`chunking_settings`::
100
105
(Optional, object) Settings for chunking text into smaller passages.
101
106
If specified, these will override the chunking settings set in the {infer-cap} endpoint associated with `inference_id`.
@@ -124,9 +129,8 @@ The number of overlapping words allowed in chunks.
124
129
Valid values are `0` or `1`.
125
130
Required for `sentence` type chunking settings.
126
131
127
-
WARNING: If the input exceeds the maximum token limit of the underlying model, some services (such as OpenAI) may return an
128
-
error. In contrast, the `elastic` and `elasticsearch` services will automatically truncate the input to fit within the
129
-
model's limit.
132
+
WARNING: When using the `none` chunking strategy, if the input exceeds the maximum token limit of the underlying model, some services (such as OpenAI) may return an error.
133
+
In contrast, the `elastic` and `elasticsearch` services will automatically truncate the input to fit within the model's limit.
130
134
131
135
====
132
136
@@ -258,12 +262,39 @@ PUT test-index
258
262
`semantic_text` uses defaults for indexing data based on the {infer} endpoint specified.
259
263
It enables you to quickstart your semantic search by providing automatic {infer} and a dedicated query so you don't need to provide further details.
260
264
261
-
In case you want to customize data indexing, use the
262
-
<<sparse-vector,`sparse_vector`>> or <<dense-vector,`dense_vector`>> field types and create an ingest pipeline with an
263
-
<<inference-processor, {infer} processor>> to generate the embeddings.
264
-
<<semantic-search-inference,This tutorial>> walks you through the process.
265
-
In these cases - when you use `sparse_vector` or `dense_vector` field types instead of the `semantic_text` field type to customize indexing - using the
266
-
<<query-dsl-semantic-query,`semantic_query`>> is not supported for querying the field data.
265
+
If you want to override those defaults and customize the embeddings that
266
+
`semantic_text` indexes, you can do so by modifying <<semantic-text-params, parameters>>:
267
+
268
+
- Use `index_options` to specify alternate index options such as specific
269
+
`dense_vector` quantization methods
270
+
- Use `chunking_settings` to override the chunking strategy associated with the
271
+
{{infer}} endpoint, or completely disable chunking using the `none` type
272
+
273
+
Here is an example of how to set these parameters for a text embedding endpoint:
0 commit comments