meilisearch

star 8

Deploy and tune Meilisearch with indexing, filtering, and production configuration.

modbender By modbender schedule Updated 3/6/2026

name: Meilisearch description: Deploy and tune Meilisearch with indexing, filtering, and production configuration. metadata: {"clawdbot":{"emoji":"๐Ÿ”Ž","os":["linux","darwin","win32"]}}

Index Configuration Traps

  • filterableAttributes and sortableAttributes must be declared BEFORE adding documents โ€” adding later triggers full reindex
  • Changing any index setting triggers reindex โ€” batch all setting changes together
  • Order of searchableAttributes affects ranking โ€” put most important fields first, not alphabetical
  • displayedAttributes defaults to all โ€” explicitly limit to reduce response size

Indexing Pitfalls

  • Document updates are async โ€” the API returns taskUid, must poll /tasks/{uid} for actual completion
  • Primary key inference fails on nested or array fields โ€” always set primaryKey explicitly
  • Batch size affects indexing speed โ€” 10-50MB batches optimal, not one document at a time
  • Updating one field requires sending the whole document โ€” no true partial updates

Typo Tolerance Issues

  • First character is never typo-tolerant โ€” "tset" won't match "test", by design
  • Typo tolerance on IDs/codes causes false matches โ€” disable per attribute with typoTolerance.disableOnAttributes
  • Min word length defaults: 1 typo at 5 chars, 2 typos at 9 chars โ€” adjust if matching too aggressively

Filtering Mistakes

  • Filters on undeclared filterableAttributes silently return empty โ€” no error, just no results
  • Geo filtering requires _geo field with lat/lng โ€” field name is hardcoded, can't customize
  • Filter syntax is NOT SQL โ€” use TO for ranges (year 2020 TO 2024), not BETWEEN
  • Empty array in IN clause causes error โ€” check array length before building filter

Search Behavior

  • Default limit is 20, max is 1000 per request โ€” no deep pagination, use filters to narrow
  • Multi-word queries match ANY word by default โ€” use quotes for phrase matching
  • Highlighting only works on searchableAttributes โ€” not on stored-only fields
  • Facets distribution counts include all matching docs โ€” not affected by limit parameter

Production Configuration

  • Master key MUST be set in production โ€” without it, all endpoints are public
  • Create search-only API keys for frontend โ€” never expose master key
  • Snapshots are the only backup method โ€” schedule them, no continuous replication
  • No clustering โ€” single node only, scale vertically with RAM

Performance Realities

  • Index lives in memory-mapped files โ€” RAM determines max index size
  • Payload limit is 100MB per request โ€” split large imports into batches
  • Indexing blocks during settings update โ€” queries still work but new docs queue
  • Task queue has no priority โ€” large reindex blocks small document adds

API Key Restrictions

  • Keys can restrict to specific indexes โ€” use for multi-tenant isolation
  • Keys can have expiresAt โ€” but no auto-rotation, must manage manually
  • Actions are granular โ€” search, documents.add, indexes.create, settings.update, etc.
  • Invalid key returns 401, missing key on protected instance returns 401 โ€” same error, check both
Install via CLI
npx skills add https://github.com/modbender/skill-library-mcp --skill meilisearch
Repository Details
star Stars 8
call_split Forks 2
navigation Branch main
article Path SKILL.md
More from Creator