Operating the server
Enabling semantic search
Semantic search finds notes by meaning rather than by exact words, across languages. It is off by default on a server you install, because it needs an embedding model that is a separate download of about 480 MB. Enabling it is one click or one command, and everything stays on your server.
Enabling it
- From the appAn administrator clicks Enable semantic search in the administration pages. The server downloads the model in the background (the page shows the progress), verifies it, then indexes every brain.
- Or from the serverRun
sudo memex model install, or choose Semantic search → Install the model and turn it on in thememexmenu. - Wait for indexingA running server notices the installed model within a minute; no restart is needed. Search keeps working by keywords in the meantime.
sudo memex model install # download, verify, install, turn semantic search on
memex model status
sudo memex model remove # delete the model, turn it off (--purge also drops the vectors)Check that it worked
memex model status reports "Semantic search: on", the model with its dimensions and size, and the number of notes and passages indexed. In the app, the search box then combines keywords and meaning, and AI clients can use the semantic_search tool.
What it costs
Figures from the product documentation, measured on a 4-core x86_64 virtual machine:
| Resource | Cost |
|---|---|
| Download | 483 MB, once |
| Disk, model | 531 MB |
| Disk, vectors | about 1.2 kB per passage in the database |
| Memory | the server grows from 22 MB to about 100 MB of resident memory when the model is loaded |
| Indexing | a 1,000-note brain (6,000 passages) is chunked, embedded and stored in 1.4 seconds |
| Vector cache | at most 512 MB over all brains; the least recently used brain is evicted first |
The model’s weights are memory-mapped, not read into memory: only the parts in use are paged in. Search is an exact scan that stays comfortable up to roughly 200,000 passages per brain (some 50,000 typical notes); beyond that it still works but gets proportionally slower. No GPU is needed.
Without internet access
The only network access semantic search ever makes is the download of the model, from the GitHub release of the version you run. On a machine that cannot reach it, download memex-model-potion-multilingual-128M.tar.gz elsewhere and install it from the file:
sudo memex model install --from /path/to/memex-model-potion-multilingual-128M.tar.gz--from also accepts an unpacked model directory. The MEMEX_MODEL_URL variable replaces the base address of the download, for an internal mirror.
Integrity and privacy
- The binary has the SHA-256 of every file of the model compiled in. A download is installed only if its files match, and they are checked again each time the model is loaded.
- No note, query or vector is sent to another service: no remote inference, no telemetry.
- Vectors are stored in the database next to the notes, are covered by the same backups, and are as sensitive as the notes they derive from.
- A person or an AI client only gets results from notes they can read.
How the search itself works is explained in How it works. Reference: semantic-search.md.