Skip to content

Commit b79ed62

Browse files
[Docs] Improve semantic_text updates documentation organization (#137340)
* Move script update restrictions section for consistency * Update docs/reference/elasticsearch/mapping-reference/semantic-text.md Co-authored-by: Liam Thompson <[email protected]> * Update docs/reference/elasticsearch/mapping-reference/semantic-text.md Co-authored-by: Liam Thompson <[email protected]> * Update docs/reference/elasticsearch/mapping-reference/semantic-text.md Co-authored-by: Liam Thompson <[email protected]> --------- Co-authored-by: Liam Thompson <[email protected]>
1 parent 169e48f commit b79ed62

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

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

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,16 @@ When updating documents that contain `semantic_text` fields, it’s important to
437437

438438
If you want to avoid unnecessary inference and keep existing embeddings:
439439

440-
* Use **partial updates through the Bulk API**.
441-
* Omit any `semantic_text` fields that did not change from the `doc` object in your request.
440+
* Use **partial updates through the Bulk API**.
441+
* Omit any `semantic_text` fields that did not change from the `doc` object in your request.
442+
443+
### Scripted updates
444+
445+
For indices containing `semantic_text` fields, updates that use scripts have the
446+
following behavior:
447+
448+
-**Supported:** [Update API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update)
449+
-**Not supported:** [Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk-1). Scripted updates will fail even if the script targets non-`semantic_text` fields.
442450

443451
## Returning semantic field embeddings in `_source`
444452

@@ -578,18 +586,6 @@ PUT my-index-000004
578586
```
579587
% TEST[skip:Requires inference endpoint]
580588

581-
## Updates to `semantic_text` fields [update-script]
582-
583-
For indices containing `semantic_text` fields, updates that use scripts have the
584-
following behavior:
585-
586-
* Are supported through
587-
the [Update API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update).
588-
* Are not supported through
589-
the [Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk-1)
590-
and will fail. Even if the script targets non-`semantic_text` fields, the
591-
update will fail when the index contains a `semantic_text` field.
592-
593589
## `copy_to` and multi-fields support [copy-to-support]
594590

595591
The semantic_text field type can serve as the target

0 commit comments

Comments
 (0)