Skip to content

[Backport 9.0] Add include_source_on_error to bulk API #3724

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

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
67 changes: 67 additions & 0 deletions output/openapi/elasticsearch-openapi.json

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions output/openapi/elasticsearch-serverless-openapi.json

Large diffs are not rendered by default.

60 changes: 56 additions & 4 deletions output/schema/schema-serverless.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 56 additions & 4 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions specification/_global/bulk/BulkRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
index?: IndexName
}
query_parameters: {
/**
* True or false if to include the document source in the error message in case of parsing errors.
* @server_default false
*/
include_source_on_error?: boolean
/**
* If `true`, the response will include the ingest pipelines that were run for each index or create.
* @server_default false
Expand Down
5 changes: 5 additions & 0 deletions specification/_global/create/CreateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ export interface Request<TDocument> extends RequestBase {
index: IndexName
}
query_parameters: {
/**
* True or false if to include the document source in the error message in case of parsing errors.
* @server_default false
*/
include_source_on_error?: boolean
/**
* The ID of the pipeline to use to preprocess incoming documents.
* If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.
Expand Down
5 changes: 5 additions & 0 deletions specification/_global/index/IndexRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ export interface Request<TDocument> extends RequestBase {
* @ext_doc_id optimistic-concurrency
*/
if_seq_no?: SequenceNumber
/**
* True or false if to include the document source in the error message in case of parsing errors.
* @server_default false
*/
include_source_on_error?: boolean
/**
* Set to `create` to only index the document if it does not already exist (put if absent).
* If a document with the specified `_id` already exists, the indexing operation will fail.
Expand Down
5 changes: 5 additions & 0 deletions specification/_global/update/UpdateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
* @ext_doc_id optimistic-concurrency
*/
if_seq_no?: SequenceNumber
/**
* True or false if to include the document source in the error message in case of parsing errors.
* @server_default false
*/
include_source_on_error?: boolean
/**
* The script language.
* @server_default painless
Expand Down
4 changes: 4 additions & 0 deletions specification/_json_spec/bulk.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
"list_executed_pipelines": {
"type": "boolean",
"description": "Sets list_executed_pipelines for all incoming documents. Defaults to unset (false)"
},
"include_source_on_error": {
"type": "boolean",
"description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true."
}
},
"body": {
Expand Down
4 changes: 4 additions & 0 deletions specification/_json_spec/create.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
"pipeline": {
"type": "string",
"description": "The pipeline id to preprocess incoming documents with"
},
"include_source_on_error": {
"type": "boolean",
"description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true."
}
},
"body": {
Expand Down
4 changes: 4 additions & 0 deletions specification/_json_spec/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
"require_data_stream": {
"type": "boolean",
"description": "When true, requires the destination to be a data stream (existing or to-be-created). Default is false"
},
"include_source_on_error": {
"type": "boolean",
"description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true."
}
},
"body": {
Expand Down
4 changes: 4 additions & 0 deletions specification/_json_spec/update.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
"require_alias": {
"type": "boolean",
"description": "When true, requires destination is an alias. Default is false"
},
"include_source_on_error": {
"type": "boolean",
"description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true."
}
},
"body": {
Expand Down
Loading