Skip to content

Meilisearch

Meilisearch searches a copy of the records you send to it and can return matches when someone misspells a word.

Visit Meilisearch

What do you send to Meilisearch?

Send documents, such as a title, description, section and stable ID for each help article. Meilisearch puts them in an index, a copy built for searching. Decide which fields people can search and which fields they can filter on. Keep the full record in the app or content system that owns it.

How do you let each team search only its own records?

Mark the account field as filterable. After checking membership, have your server issue a short-lived tenant token, a search credential with a filter Meilisearch enforces. Give the browser only that token for the private index. Keep the parent search key, other unrestricted search keys, and master, admin and write credentials on the server.

Tenant tokens apply to searches. Your app still decides who can open or update the underlying record. Send only the fields the result needs.

When should a change appear in results?

An accepted write or delete gives you a task to follow. Wait for that task to succeed before expecting the result to change. If it fails, inspect the task’s explanation before retrying. Send deletions from your source records too, so a removed article does not keep appearing in search.

How can you check a private search locally?

Use a throwaway local Meilisearch instance bound to this computer, its own empty data folder and a disposable app. Confirm the actual search address, index, credentials, write connection and account source are local and separate from production. Use fictional records only. If you cannot verify the setup, write down expected results for each account without sending requests.

  1. Make two results with the same word
    Add a Cedar invoice for each of two fake accounts and wait for indexing to succeed. Give each account a different title suffix so you can tell the records apart.
  2. Check both accounts
    Sign in as each account in a clean browser profile. Verify that the browser receives only its tenant token and that the search response contains its invoice and excludes the other account’s. Check the response itself, including any returned titles or snippets.
  3. Remove one record
    Delete the first sample by its stable ID, wait for the task to succeed and search again as both accounts. The first should see no result. The second should still see its original invoice.

What do you pay for, and how can you recover the index?

Meilisearch Cloud’s public pricing lists an XS instance with 32 GiB of disk starting at US$20 per month. The rate depends on instance size and region. Disk capacity and outbound data transfer are billed separately from compute, so check the regional estimate for your workload. With the MIT-licensed Community Edition you run the server, updates and backups yourself.

A self-hosted snapshot is for restoring a compatible same-version instance. A dump carries documents and settings for migration and rebuild. Keep source records and test restoring a copy away from your live index.