2021-09-21 07:57:06 +02:00
# Meilisearch {#module-services-meilisearch}
Meilisearch is a lightweight, fast and powerful search engine. Think elastic search with a much smaller footprint.
2023-01-05 05:50:12 +01:00
## Quickstart {#module-services-meilisearch-quickstart}
2021-09-21 07:57:06 +02:00
the minimum to start meilisearch is
```nix
2024-03-27 19:10:27 +01:00
{
services.meilisearch.enable = true;
}
2021-09-21 07:57:06 +02:00
```
this will start the http server included with meilisearch on port 7700.
test with `curl -X GET 'http://localhost:7700/health'`
2023-01-05 05:50:12 +01:00
## Usage {#module-services-meilisearch-usage}
2021-09-21 07:57:06 +02:00
you first need to add documents to an index before you can search for documents.
2023-01-05 05:50:12 +01:00
### Add a documents to the `movies` index {#module-services-meilisearch-quickstart-add}
2021-09-21 07:57:06 +02:00
`curl -X POST 'http://127.0.0.1:7700/indexes/movies/documents' --data '[{"id": "123", "title": "Superman"}, {"id": 234, "title": "Batman"}]'`
2023-01-05 05:50:12 +01:00
### Search documents in the `movies` index {#module-services-meilisearch-quickstart-search}
2021-09-21 07:57:06 +02:00
`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)
2023-01-05 05:50:12 +01:00
## Defaults {#module-services-meilisearch-defaults}
2021-09-21 07:57:06 +02:00
- The default nixos package doesn't come with the [dashboard ](https://docs.meilisearch.com/learn/getting_started/quick_start.html#search ), since the dashboard features makes some assets downloads at compile time.
2023-05-20 04:11:38 +02:00
- Anonymized Analytics sent to meilisearch are disabled by default.
2021-09-21 07:57:06 +02:00
- Default deployment is development mode. It doesn't require a secret master key. All routes are not protected and accessible.
2023-01-05 05:50:12 +01:00
## Missing {#module-services-meilisearch-missing}
2021-09-21 07:57:06 +02:00
- the snapshot feature is not yet configurable from the module, it's just a matter of adding the relevant environment variables.