Skip to content

Commit 1caa6e3

Browse files
authored
[Docs] Edit semantic_text update instructions for clarity (#137345)
* [Docd] Update semantic_text update instructions for clarity while reviewing #137340, I noticed this section was a little messy refactored to use definition lists * Clarify instructions on preserving embeddings
1 parent f77a073 commit 1caa6e3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -424,20 +424,20 @@ POST test-index/_search
424424

425425
## Updates and partial updates for `semantic_text` fields [semantic-text-updates]
426426

427-
When updating documents that contain `semantic_text` fields, its important to understand how inference is triggered:
427+
When updating documents that contain `semantic_text` fields, it's important to understand how inference is triggered:
428428

429-
* **Full document updates**
430-
When you perform a full document update, **all `semantic_text` fields will re-run inference** even if their values did not change. This ensures that the embeddings are always consistent with the current document state but can increase ingestion costs.
429+
Full document updates
430+
: Full document updates re-run inference on all `semantic_text` fields, even if their values did not change. This ensures that embeddings remain consistent with the current document state but can increase ingestion costs.
431431

432-
* **Partial updates using the Bulk API**
433-
Partial updates that **omit `semantic_text` fields** and are submitted through the [Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk) will **reuse the existing embeddings** stored in the index. In this case, inference is **not triggered** for fields that were not updated, which can significantly reduce processing time and cost.
432+
Partial updates using the Bulk API
433+
: Partial updates submitted through the [Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk) reuse existing embeddings when you omit `semantic_text` fields. Inference does not run for omitted fields, which can significantly reduce processing time and cost.
434434

435-
* **Partial updates using the Update API**
436-
When using the [Update API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update) with a `doc` object that **omits `semantic_text` fields**, inference **will still run** on all `semantic_text` fields. This means that even if the field values are not changed, embeddings will be re-generated.
435+
Partial updates using the Update API
436+
: Partial updates submitted through the [Update API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update) re-run inference on all `semantic_text` fields, even when you omit them from the `doc` object. Embeddings are re-generated regardless of whether field values changed.
437437

438-
If you want to avoid unnecessary inference and keep existing embeddings:
438+
To preserve existing embeddings and avoid unnecessary inference costs:
439439

440-
* Use **partial updates through the Bulk API**.
440+
* Use partial updates with the Bulk API.
441441
* Omit any `semantic_text` fields that did not change from the `doc` object in your request.
442442

443443
### Scripted updates

0 commit comments

Comments
 (0)