Skip to content

Commit

Permalink
fix: adjusts to use retry_on_conflict on bulk
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolascb authored and ncbfretebras committed Jan 17, 2023
1 parent 65e452b commit ead387d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions opensearchutil/bulk_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ type bulkActionMetadata struct {
WaitForActiveShards interface{} `json:"wait_for_active_shards,omitempty"`
Refresh *string `json:"refresh,omitempty"`
RequireAlias *bool `json:"require_alias,omitempty"`
RetryOnConflict *int `json:"retry_on_conflict,omitempty"`
}

// BulkIndexerResponse represents the OpenSearch response.
Expand Down Expand Up @@ -447,6 +448,7 @@ func (w *worker) writeMeta(item BulkIndexerItem) error {
WaitForActiveShards: item.WaitForActiveShards,
Refresh: item.Refresh,
RequireAlias: item.RequireAlias,
RetryOnConflict: item.RetryOnConflict,
}
// Can not specify version or seq num if no document ID is passed
if meta.DocumentID == "" {
Expand Down

0 comments on commit ead387d

Please sign in to comment.