summary refs log tree commit diff
path: root/nixos/modules/services/search/meilisearch.xml
blob: c1a73f358c288a5a65e55b001d8a9213b126f41c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<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>
  <section xml:id="quickstart">
    <title>Quickstart</title>
    <para>
      the minimum to start meilisearch is
    </para>
    <programlisting language="bash">
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>
  <section xml:id="usage">
    <title>Usage</title>
    <para>
      you first need to add documents to an index before you can search
      for documents.
    </para>
    <section xml:id="add-a-documents-to-the-movies-index">
      <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 '[{&quot;id&quot;: &quot;123&quot;, &quot;title&quot;: &quot;Superman&quot;}, {&quot;id&quot;: 234, &quot;title&quot;: &quot;Batman&quot;}]'</literal>
      </para>
    </section>
    <section xml:id="search-documents-in-the-movies-index">
      <title>Search documents in the <literal>movies</literal>
      index</title>
      <para>
        <literal>curl 'http://127.0.0.1:7700/indexes/movies/search' --data '{ &quot;q&quot;: &quot;botman&quot; }'</literal>
        (note the typo is intentional and there to demonstrate the typo
        tolerant capabilities)
      </para>
    </section>
  </section>
  <section xml:id="defaults">
    <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>
  <section xml:id="missing">
    <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>