anchor.diff:  // TESTRESPONSE[s/"_seq_no" : \d+/"_seq_no" : $body._seq_no/ ]
   // TESTRESPONSE[s/"_primary_term" : \d+/"_primary_term" : $body._primary_term/]
   
  -
   [float]
   [[getting-started-batch-processing]]
  -=== Batch processing
  -
  -In addition to being able to index, update, and delete individual documents, Elasticsearch also provides the ability to perform any of the above operations in batches using the {ref}/docs-bulk.html[`_bulk` API]. This functionality is important in that it provides a very efficient mechanism to do multiple operations as fast as possible with as few network roundtrips as possible.
  -
  -As a quick example, the following call indexes two documents (ID 1 - John Doe and ID 2 - Jane Doe) in one bulk operation:
  -
  -[source,js]
  ---------------------------------------------------
  -POST /customer/_doc/_bulk?pretty
  -{"index":{"_id":"1"}}
  -{"name": "John Doe" }
  -{"index":{"_id":"2"}}
  -{"name": "Jane Doe" }
  ---------------------------------------------------
  -// CONSOLE
  -
  -This example updates the first document (ID of 1) and then deletes the second document (ID of 2) in one bulk operation:
  -
  -[source,sh]
  ---------------------------------------------------
  -POST /customer/_doc/_bulk
  -{"update":{"_id":"1"}}
  -{"doc": { "name": "John Doe becomes Jane Doe" } }
  -{"delete":{"_id":"2"}}
  ---------------------------------------------------
  -// CONSOLE
  -// TEST[continued]
  -
  -Note above that for the delete action, there is no corresponding source document after it since deletes only require the ID of the document to be deleted.
  -
  -The Bulk API does not fail due to failures in one of the actions. If a single action fails for whatever reason, it will continue to process the remainder of the actions after it. When the bulk API returns, it will provide a status for each action (in the same order it was sent in) so that you can check if a specific action failed or not.
  -
  -[float]
  -=== Sample dataset
  -
  -Now that we've gotten a glimpse of the basics, let's try to work on a more realistic dataset. I've prepared a sample of fictitious JSON documents of customer bank account information. Each document has the following schema:
  -
  +=== Indexing documents in bulk
  +
  +If you have a lot of documents to index, you can submit them in batches with
  +the {ref}/docs-bulk.html[bulk API]. Using bulk to batch document
  +operations is significantly faster than submitting requests individually as it minimizes network roundtrips. 
  +
  +The optimal batch size depends a number of factors: the document size and complexity, the indexing and search load, and the resources available to your cluster. A good place to start is with batches of 1,000 to 5,000 documents
  +and a total payload between 5MB and 15MB. From there, you can experiment
  +to find the sweet spot.
  +
  +To get some data into {es} that you can start searching and analyzing:
  +
  +. Download the https://github.com/elastic/elasticsearch/blob/master/docs/src/test/resources/accounts.json?raw=true[`accounts.json`] sample data set. The documents in this randomly-generated data set represent user accounts with the following information:
  ++
   [source,js]
   --------------------------------------------------
   {
  
positive.code: --------------------------------------------------
  // NOTCONSOLE
  
  For the curious, this data was generated using http://www.json-generator.com/[`www.json-generator.com/`], so please ignore the actual values and semantics of the data as these are all randomly generated.
  
  You can download the sample dataset (accounts.json) from https://github.com/elastic/elasticsearch/blob/master/docs/src/test/resources/accounts.json?raw=true[here]. Extract it to our current directory and let's load it into our cluster as follows:
  
  [source,sh]
  --------------------------------------------------
  curl -H "Content-Type: application/json" -XPOST "localhost:9200/bank/_doc/_bulk?pretty&refresh" --data-binary "@accounts.json"
  curl "localhost:9200/_cat/indices?v"
  --------------------------------------------------
  // NOTCONSOLE
  
  ////
  This replicates the above in a document-testing friendly way but isn't visible
  in the docs:
  
  [source,js]
  --------------------------------------------------
  GET /_cat/indices?v
  
negative.code: --------------------------------------------------
  // CONSOLE
  +
  The response should indicate that the status of the `elasticsearch` cluster
  is `green` and it has three nodes:
  +
  [source,txt]
  --------------------------------------------------
  