QuickDevGuide

Home › Elasticsearch DB

Bulk Indexing & Reindexing — Elasticsearch DB

Bulk API bulk sends many index/create/update/delete actions in one request (NDJSON: action line + document line). Aim for 5–15 MB per request and check errors in the response — a bulk call returns 200 even if some items failed. For large initial loads, temporarily set refreshinterval: -1 and numberofreplicas: 0, then restore them. Reindex with zero downtime Create productsv2 with the new mapping. POST reindex from productsv1 (optionally transform with a script or ingest pipeline). Atomically switch the alias products from v1 to v2. Delete v1 when you are confident. Applications always talk to the alias, never to a versioned index name. Ingest pipelines Run processors on documents before indexing: set, rename, lowercase, date, grok, geoip, script.

Key Takeaways