Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the usage of update document API with ingest pipeline #8874

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions _api-reference/document-apis/update-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
If you need to update a document's fields in your index, you can use the update document API operation. You can do so by specifying the new data you want to be in your index or by including a script in your request body, which OpenSearch runs to update the document. By default, the update operation only updates a document that exists in the index. If a document does not exist, the API returns an error. To _upsert_ a document (update the document that exists or index a new one), use the [upsert](#using-the-upsert-operation) operation.


You cannot specify any ingest pipeline explicitly when calling the update document API, but the pre-defined default pipeline or final pipeline can be executed under some conditions. Case that when performing upsert operation and a new document is indexed, the pre-defined default pipeline or final pipeline in the index is supposed to be executed. However, when performaing update operation for the existing document, the default pipeline or final pipeline is not supposed to be executed but actually it's executed, a deprecation warning header as follows will be returned, and the support will be removed in 3.0.0.

Check failure on line 17 in _api-reference/document-apis/update-document.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.SubstitutionsError] Use 'predefined' instead of 'pre-defined'. Raw Output: {"message": "[OpenSearch.SubstitutionsError] Use 'predefined' instead of 'pre-defined'.", "location": {"path": "_api-reference/document-apis/update-document.md", "range": {"start": {"line": 17, "column": 97}}}, "severity": "ERROR"}

Check failure on line 17 in _api-reference/document-apis/update-document.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.SubstitutionsError] Use 'predefined' instead of 'pre-defined'. Raw Output: {"message": "[OpenSearch.SubstitutionsError] Use 'predefined' instead of 'pre-defined'.", "location": {"path": "_api-reference/document-apis/update-document.md", "range": {"start": {"line": 17, "column": 261}}}, "severity": "ERROR"}

Check failure on line 17 in _api-reference/document-apis/update-document.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Spelling] Error: performaing. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks. Raw Output: {"message": "[OpenSearch.Spelling] Error: performaing. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_api-reference/document-apis/update-document.md", "range": {"start": {"line": 17, "column": 363}}}, "severity": "ERROR"}
gaobinlong marked this conversation as resolved.
Show resolved Hide resolved
```
the index [sample-index1] has a default ingest pipeline or a final ingest pipeline, the support of the ingest pipelines for update operation causes unexpected result and will be removed in 3.0.0
```

## Path and HTTP methods

```json
Expand Down
Loading