2.0 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"}]'
Search documents in the movies index
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.
-
no_analyticsis set to true by default. -
http_addris derived from {option}services.meilisearch.listenAddressand {option}services.meilisearch.listenPort. The two sub-fields are separate because this makes it easier to consume in certain other modules. -
db_pathis set to/var/lib/meilisearchby default. Upstream, the default value is equivalent to/var/lib/meilisearch/data.ms. -
dump_dirandsnapshot_dirare set to/var/lib/meilisearch/dumpsand/var/lib/meilisearch/snapshots, respectively. This is equivalent to the upstream defaults. -
All other options inherit their upstream defaults. In particular, the default configuration uses
env = "development", which doesn't require a master key, in which case all routes are unprotected.