Bulk Import with _bulk

6 min
Audience
beginner who understood mapping and refresh (lessons 02 and 03)
Duration
25 to 30 min
Module
2/7
Target skill
load thousands of documents in one request, read the _bulk response without being trapped, and copy an index with _reindex

In One Picture

Delivering 504 parcels one by one means 504 round trips of the truck: the road (the HTTP connection) costs more than the parcel. _bulk is loading the truck: a single request that carries hundreds of operations, each written on two lines, the label ("index into cours with id C0001") then the parcel (the document). The driver comes back with a delivery note, items, that says parcel by parcel what happened, and a global warning light, errors, that turns on as soon as a single parcel was refused. This is exactly what labo.sh importer does with the three .ndjson files of the kit; and _reindex is the same truck loading directly from one index to unload into another.

Preview — the rest of the lesson is for enrolled readers.

Already enrolled with a code?

Your access is tied to your account, not to this link. Sign in with the same email you used in class: your course is waiting, no need to enter the code again.

Sign inNo account yet? Create one
This lesson is part of the “Elasticsearch: Index and Find Documents” module

The first modules of the course are open to everyone. For the rest you have three options: buy this course once and for all, subscribe, or enter the code handed out in class.

Are you a student on this course?

The code is tied to your account: sign in or create an account and it will be applied automatically when you come back.

No account yet? Create one