nixpkgs/nixos/modules/services/search/meilisearch.md
pennae dc7788efb8 nixos/manual: regenerate chapter xml files
apparently pandoc has changed behavior over the past releases, so the
files are no longer in sync. occasionally this requires edits
to the markdown source to not remove an anchor that was there
before (albeit wth a very questionable id), or where things were simply
being misrendered due to syntax errors.
2023-01-10 10:31:59 +01:00

1.7 KiB

Meilisearch

Meilisearch is a lightweight, fast and powerful search engine. Think elastic search with a much smaller footprint.

Quickstart

the minimum to start meilisearch is

services.meilisearch.enable = true;

this will start the http server included with meilisearch on port 7700.

test with curl -X GET 'http://localhost:7700/health'

Usage

you first need to add documents to an index before you can search for documents.

Add a documents to the movies index

curl -X POST 'http://127.0.0.1:7700/indexes/movies/documents' --data '[{"id": "123", "title": "Superman"}, {"id": 234, "title": "Batman"}]'

curl 'http://127.0.0.1:7700/indexes/movies/search' --data '{ "q": "botman" }' (note the typo is intentional and there to demonstrate the typo tolerant capabilities)

Defaults

  • The default nixos package doesn't come with the dashboard, since the dashboard features makes some assets downloads at compile time.

  • Anonimized Analytics sent to meilisearch are disabled by default.

  • Default deployment is development mode. It doesn't require a secret master key. All routes are not protected and accessible.

Missing

  • the snapshot feature is not yet configurable from the module, it's just a matter of adding the relevant environment variables.