2023-01-20 10:41:00 +00:00
|
|
|
|
<!-- Do not edit this file directly, edit its companion .md instead
|
|
|
|
|
and regenerate this file using nixos/doc/manual/md-to-db.sh -->
|
2021-09-26 12:46:18 +00:00
|
|
|
|
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-meilisearch">
|
|
|
|
|
<title>Meilisearch</title>
|
|
|
|
|
<para>
|
|
|
|
|
Meilisearch is a lightweight, fast and powerful search engine. Think
|
|
|
|
|
elastic search with a much smaller footprint.
|
|
|
|
|
</para>
|
2023-01-20 10:41:00 +00:00
|
|
|
|
<section xml:id="module-services-meilisearch-quickstart">
|
2021-09-26 12:46:18 +00:00
|
|
|
|
<title>Quickstart</title>
|
|
|
|
|
<para>
|
|
|
|
|
the minimum to start meilisearch is
|
|
|
|
|
</para>
|
2023-01-20 10:41:00 +00:00
|
|
|
|
<programlisting language="nix">
|
2021-09-26 12:46:18 +00:00
|
|
|
|
services.meilisearch.enable = true;
|
|
|
|
|
</programlisting>
|
|
|
|
|
<para>
|
|
|
|
|
this will start the http server included with meilisearch on port
|
|
|
|
|
7700.
|
|
|
|
|
</para>
|
|
|
|
|
<para>
|
|
|
|
|
test with
|
|
|
|
|
<literal>curl -X GET 'http://localhost:7700/health'</literal>
|
|
|
|
|
</para>
|
|
|
|
|
</section>
|
2023-01-20 10:41:00 +00:00
|
|
|
|
<section xml:id="module-services-meilisearch-usage">
|
2021-09-26 12:46:18 +00:00
|
|
|
|
<title>Usage</title>
|
|
|
|
|
<para>
|
|
|
|
|
you first need to add documents to an index before you can search
|
|
|
|
|
for documents.
|
|
|
|
|
</para>
|
2023-01-20 10:41:00 +00:00
|
|
|
|
<section xml:id="module-services-meilisearch-quickstart-add">
|
2021-09-26 12:46:18 +00:00
|
|
|
|
<title>Add a documents to the <literal>movies</literal>
|
|
|
|
|
index</title>
|
|
|
|
|
<para>
|
|
|
|
|
<literal>curl -X POST 'http://127.0.0.1:7700/indexes/movies/documents' --data '[{"id": "123", "title": "Superman"}, {"id": 234, "title": "Batman"}]'</literal>
|
|
|
|
|
</para>
|
|
|
|
|
</section>
|
2023-01-20 10:41:00 +00:00
|
|
|
|
<section xml:id="module-services-meilisearch-quickstart-search">
|
2021-09-26 12:46:18 +00:00
|
|
|
|
<title>Search documents in the <literal>movies</literal>
|
|
|
|
|
index</title>
|
|
|
|
|
<para>
|
|
|
|
|
<literal>curl 'http://127.0.0.1:7700/indexes/movies/search' --data '{ "q": "botman" }'</literal>
|
|
|
|
|
(note the typo is intentional and there to demonstrate the typo
|
|
|
|
|
tolerant capabilities)
|
|
|
|
|
</para>
|
|
|
|
|
</section>
|
|
|
|
|
</section>
|
2023-01-20 10:41:00 +00:00
|
|
|
|
<section xml:id="module-services-meilisearch-defaults">
|
2021-09-26 12:46:18 +00:00
|
|
|
|
<title>Defaults</title>
|
|
|
|
|
<itemizedlist>
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
|
|
|
|
The default nixos package doesn’t come with the
|
|
|
|
|
<link xlink:href="https://docs.meilisearch.com/learn/getting_started/quick_start.html#search">dashboard</link>,
|
|
|
|
|
since the dashboard features makes some assets downloads at
|
|
|
|
|
compile time.
|
|
|
|
|
</para>
|
|
|
|
|
</listitem>
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
|
|
|
|
Anonimized Analytics sent to meilisearch are disabled by
|
|
|
|
|
default.
|
|
|
|
|
</para>
|
|
|
|
|
</listitem>
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
|
|
|
|
Default deployment is development mode. It doesn’t require a
|
|
|
|
|
secret master key. All routes are not protected and
|
|
|
|
|
accessible.
|
|
|
|
|
</para>
|
|
|
|
|
</listitem>
|
|
|
|
|
</itemizedlist>
|
|
|
|
|
</section>
|
2023-01-20 10:41:00 +00:00
|
|
|
|
<section xml:id="module-services-meilisearch-missing">
|
2021-09-26 12:46:18 +00:00
|
|
|
|
<title>Missing</title>
|
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
|
<listitem>
|
|
|
|
|
<para>
|
|
|
|
|
the snapshot feature is not yet configurable from the module,
|
|
|
|
|
it’s just a matter of adding the relevant environment
|
|
|
|
|
variables.
|
|
|
|
|
</para>
|
|
|
|
|
</listitem>
|
|
|
|
|
</itemizedlist>
|
|
|
|
|
</section>
|
|
|
|
|
</chapter>
|