O'Reilly logo

Elasticsearch Server Second Edition by Marek Rogoziński, Rafał Kuć

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Batch indexing to speed up your indexing process

In the first chapter, we've seen how to index a particular document into Elasticsearch. Now, it's time to find out how to index many documents in a more convenient and efficient way than doing it one by one.

Preparing data for bulk indexing

Elasticsearch allows us to merge many requests into one packet. These packets can be sent as a single request. In this way, we can mix the following operations:

  • Adding or replacing the existing documents in the index (index)
  • Removing documents from the index (delete)
  • Adding new documents to the index when there is no other definition of the document in the index (create)

The format of the request was chosen for processing efficiency. It assumes that every line of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required