Skip to content

Commit 2e5a4ba

Browse files
authored
Add include_source_on_error to bulk API (#3691)
* Add include_source_on_error to bulk API * Add create, index and update
1 parent 7c6161b commit 2e5a4ba

File tree

13 files changed

+286
-8
lines changed

13 files changed

+286
-8
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema-serverless.json

Lines changed: 56 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 56 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_global/bulk/BulkRequest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
165165
index?: IndexName
166166
}
167167
query_parameters: {
168+
/**
169+
* True or false if to include the document source in the error message in case of parsing errors.
170+
* @server_default false
171+
*/
172+
include_source_on_error?: boolean
168173
/**
169174
* If `true`, the response will include the ingest pipelines that were run for each index or create.
170175
* @server_default false

specification/_global/create/CreateRequest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ export interface Request<TDocument> extends RequestBase {
131131
index: IndexName
132132
}
133133
query_parameters: {
134+
/**
135+
* True or false if to include the document source in the error message in case of parsing errors.
136+
* @server_default false
137+
*/
138+
include_source_on_error?: boolean
134139
/**
135140
* The ID of the pipeline to use to preprocess incoming documents.
136141
* If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.

specification/_global/index/IndexRequest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ export interface Request<TDocument> extends RequestBase {
196196
* @ext_doc_id optimistic-concurrency
197197
*/
198198
if_seq_no?: SequenceNumber
199+
/**
200+
* True or false if to include the document source in the error message in case of parsing errors.
201+
* @server_default false
202+
*/
203+
include_source_on_error?: boolean
199204
/**
200205
* Set to `create` to only index the document if it does not already exist (put if absent).
201206
* If a document with the specified `_id` already exists, the indexing operation will fail.

specification/_global/update/UpdateRequest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ export interface Request<TDocument, TPartialDocument> extends RequestBase {
9191
* @ext_doc_id optimistic-concurrency
9292
*/
9393
if_seq_no?: SequenceNumber
94+
/**
95+
* True or false if to include the document source in the error message in case of parsing errors.
96+
* @server_default false
97+
*/
98+
include_source_on_error?: boolean
9499
/**
95100
* The script language.
96101
* @server_default painless

specification/_json_spec/bulk.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@
7373
"list_executed_pipelines": {
7474
"type": "boolean",
7575
"description": "Sets list_executed_pipelines for all incoming documents. Defaults to unset (false)"
76+
},
77+
"include_source_on_error": {
78+
"type": "boolean",
79+
"description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true."
7680
}
7781
},
7882
"body": {

specification/_json_spec/create.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@
5858
"pipeline": {
5959
"type": "string",
6060
"description": "The pipeline id to preprocess incoming documents with"
61+
},
62+
"include_source_on_error": {
63+
"type": "boolean",
64+
"description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true."
6165
}
6266
},
6367
"body": {

specification/_json_spec/index.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@
8989
"require_data_stream": {
9090
"type": "boolean",
9191
"description": "When true, requires the destination to be a data stream (existing or to-be-created). Default is false"
92+
},
93+
"include_source_on_error": {
94+
"type": "boolean",
95+
"description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true."
9296
}
9397
},
9498
"body": {

specification/_json_spec/update.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@
7777
"require_alias": {
7878
"type": "boolean",
7979
"description": "When true, requires destination is an alias. Default is false"
80+
},
81+
"include_source_on_error": {
82+
"type": "boolean",
83+
"description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true."
8084
}
8185
},
8286
"body": {

0 commit comments

Comments
 (0)