The config.yml file defines how data is moved from your source to Meilisearch. Below is a breakdown of the main configuration sections:
Global Settings
debug: (boolean) Set to true to enable verbose logging.plugins: A list of Python modules to use as global plugins.sentry: Configuration for Sentry error tracking (dsn and environment).
progress
Used to record the last sync position (e.g., MySQL binlog position).
type: file or redis.path: (Required if type: file) File path to store progress (default: progress.json).key: (Required if type: redis) Redis key (default: meilisync:progress).dsn: Redis connection string (default: redis://localhost:6379/0).
source
Database connection settings.
type: mysql, postgres, or mongo.database: The name of the database.server_id: (MySQL only) Binlog server ID (default: 1).host, port, user, password: Standard connection arguments.
meilisearch
Meilisearch connection and batching settings.
api_url: The Meilisearch API URL.api_key: The Meilisearch API key.insert_size: Number of documents to collect before performing an insert.insert_interval: Number of seconds to wait before performing an insert.
Note: If neither insert_size nor insert_interval is set, documents are inserted immediately. For better performance, increase these values.
sync
An array of sync tasks. Each task defines a mapping between a database table/collection and a Meilisearch index.
table: The source table or collection name.index: The target Meilisearch index name (defaults to table name if omitted).full: (boolean) Whether to perform a full sync (default: false).fields: A mapping of {source_field: target_field}. If omitted, all fields are synced using their original names.plugins: A list of table-level plugins.
debug: true
plugins:
- meilisync.plugin.Plugin
progress:
type: file
source:
type: mysql
host: 192.168.123.205
port: 3306
user: root
password: "123456"
database: beauty
meilisearch:
api_url: http://192.168.123.205:7700
api_key: ""
insert_size: 1000
insert_interval: 10
sync:
- table: collection
index: beauty-collections
plugins:
- meilisync.plugin.Plugin
full: true
fields:
id:
title:
description:
category:
- table: picture
index: beauty-pictures
full: true
fields:
id:
description:
category
sentry:
dsn: ""
environment: "production"