[[reference-bulk]] //////// =========================================================================================================================== || || || || || || || ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ || || ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ || || ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ || || ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ || || ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ || || ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ || || || || || || This file is autogenerated, DO NOT send pull requests that changes this file directly. || || You should update the script that does the generation, which can be found in: || || https://github.com/elastic/elastic-client-generator-js || || || || You can run the script with the following command: || || npm run elasticsearch -- --version || || || || || || || =========================================================================================================================== //////// [discrete] [[client.bulk]] === client.bulk Bulk index or delete documents. Performs multiple indexing or delete operations in a single API call. This reduces overhead and can greatly increase indexing speed. {ref}/docs-bulk.html[{es} documentation] [discrete] ==== Function signature [source,ts] ---- (BulkRequest, options?): Promise ---- [discrete] ==== Request [pass] ++++
++++
interface BulkRequest extends <> {
  index?: <>
  pipeline?: string
  refresh?: <>
  routing?: <>
  _source?: <>
  _source_excludes?: <>
  _source_includes?: <>
  timeout?: <>
  wait_for_active_shards?: <>
  require_alias?: boolean
  operations?: (<> | <> | TDocument)[]
}

[pass]
++++
++++ [discrete] ==== Response [pass] ++++
++++
interface BulkResponse {
  errors: boolean
  items: Partial>, <>>>[]
  took: <>
  ingest_took?: <>
}

[pass]
++++
++++