{
  "id": 18466599,
  "title": "Meilisearch is the easy part. The sync worker is where it hurts.",
  "url": "https://urgent.news/2026/11/06/meilisearch-is-the-easy-part-the-sync-worker-is-where-it-hurts",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-06T08:07:27.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/cramxd/meilisearch-is-the-easy-part-the-sync-worker-is-where-it-hurts-5fa2"
  },
  "original_language": "en",
  "account": "Meilisearch's search functionality works well with a simple ILIKE query, but the worker component that keeps the search index in sync with the database presents challenges. Setting up Meilisearch in Docker compose, indexing 20,002 rows from PostgreSQL, reveals issues with the cursor-based pagination. The timestamp used for updates in PostgreSQL is not accurate, leading to missing documents when incrementing the cursor using \"=\". Switching to the equal sign resolves the issue but causes the worker to stall at a specific number of documents. A fix involves using a composite index with both the updated_at timestamp and id field. Another trap lies in the handling of timestamps in PostgreSQL, which converts timestamptz to JavaScript Date objects with milliseconds. Selecting this column without casting can cause issues with the cursor format. Meilisearch and PostgreSQL return different results for similar queries, with Meilisearch handling prefix matching better. The design choice of strict AND matching and ignoring edit distance comes at the cost of increased storage requirements, with Meilisearch needing roughly 4.3 times more disk space for the same number of documents. Despite these challenges, the architecture proves beneficial due to the ease of rebuilding the index when issues arise.",
  "summary": "Suppose your product catalog lives in Postgres and search is ILIKE '%term%' . It works, nobody complains, and the table is small. Then hedphones returns nothing, the query plan turns into a sequential scan, and you start reading about Meilisearch. The indexing part is genuinely easy. docker compose up , create the index, push documents, done. The guide linked below walks the whole build and every…",
  "key_points": [
    "Meilisearch's sync worker causes challenges due to cursor-based pagination issues.",
    "Switching to equal sign resolves cursor stalling but stalls worker at specific documents.",
    "Composite index with updatedat timestamp and id field fixes worker stalling issue."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}