Snap.Bulk.Action.Create (Snap v0.17.0)

Copy Markdown View Source

Represents a create step in a Snap.Bulk operation.

Creates a document if it does not already exist, returning an error otherwise.

Supports the following fields:

  • doc - the document to index (required)
  • index - the index to write to, if not specified on the bulk operation
  • id - the document ID. Elasticsearch generates one if it is omitted
  • require_alias - when true, the destination must be an index alias
  • routing - the custom routing value for the document
  • version - the explicit version number, for optimistic concurrency control
  • version_type - one of :internal, :external or :external_gte
  • if_seq_no - only perform the action if the document has this sequence number
  • if_primary_term - only perform the action if the document has this primary term
  • pipeline - the ingest pipeline to run the document through

Summary

Types

t()

@type t() :: %Snap.Bulk.Action.Create{
  doc: map(),
  id: String.t() | nil,
  if_primary_term: integer() | nil,
  if_seq_no: integer() | nil,
  index: String.t() | nil,
  pipeline: String.t() | nil,
  require_alias: boolean() | nil,
  routing: String.t() | nil,
  version: integer() | nil,
  version_type: Snap.Bulk.Action.version_type() | nil
}