Skip to content

Commit

Permalink
Allow fields in BulkOperation to be optional
Browse files Browse the repository at this point in the history
    https://opensearch.org/docs/1.3/api-reference/document-apis/bulk/#request-body
    > All actions support the same metadata: _index, _id, and _require_alias. If you don’t provide an ID, OpenSearch generates one automatically, which can make it challenging to update the document at a later time.

Signed-off-by: Cameron Durham <u64.cam@gmail.com>
  • Loading branch information
camerondurham committed Feb 3, 2023
1 parent 3aef6af commit 4ac7d58
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions api/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ export interface BulkIndexOperation extends BulkOperation { }
export interface BulkIndexResponseItem extends BulkResponseItemBase { }

export interface BulkOperation {
_id: Id;
_index: IndexName;
retry_on_conflict: integer;
routing: Routing;
version: VersionNumber;
version_type: VersionType;
_id?: Id;
_index?: IndexName;
retry_on_conflict?: integer;
routing?: Routing;
version?: VersionNumber;
version_type?: VersionType;
}

export interface BulkOperationContainer {
Expand Down

0 comments on commit 4ac7d58

Please sign in to comment.