Skip to main content
The official meilisearch-importer is a high-performance CLI tool for bulk importing large datasets into Meilisearch. It handles millions of documents with automatic retry logic and progress tracking.

Features

  • Import CSV, NDJSON, and JSON (array of objects) files
  • Handle datasets from thousands to 40+ million documents
  • Automatic retry logic for failed batches
  • Real-time progress tracking with ETA
  • Configurable batch sizes for performance tuning

Prerequisites

  • A Meilisearch instance (Cloud or self-hosted)
  • One of:
    • Rust/Cargo installed (for building from source)
    • Pre-built binary from releases

Installation

Basic usage

Import a CSV file:
Set your environment variables:

Supported formats

CSV

CSV files must have a header row. The importer automatically detects column types.

NDJSON (Newline-delimited JSON)

Each line must be a valid JSON object:

JSON array

File must contain an array of objects:

Configuration options

Performance tuning

Batch size

Adjust batch size based on your document size and network:

Primary key

Specify the primary key if auto-detection fails:

Example: Import a large dataset

Import 10 million products with progress tracking:
Output:

After import

Verify your import:
Test a search:

Next steps

Configure settings

Set up searchable and filterable attributes

Debug performance

Identify and fix indexing bottlenecks

Resources