configuration
Search Engine
Meilisearch v1.7 powers global search. Configuration, indices, and rebuilds.
Glyph uses Meilisearch v1.7 as its search backend. It runs in a dedicated Docker container alongside MySQL and the backend.
Container details
| Value | |
|---|---|
| Image | getmeili/meilisearch:v1.7 |
| Container name | glyph-meilisearch |
| Volume | ./volumes/meilisearch (bind mount on host) |
| Internal port | 7700 (not exposed externally) |
| Master key | from MEILISEARCH_KEY env var |
| Mode | production |
The backend connects to http://meilisearch:7700 over the internal Docker network. The port is not published to the host - Meilisearch is unreachable from outside.
Indices
Glyph maintains three indices, automatically created and updated:
| Index | Documents | Searchable fields |
|---|---|---|
projects-<workspace_id> | One per project | name, description |
files-<workspace_id> | One per file in each project | path, content |
docs-<workspace_id> | One per documentation entry | content, file_path, commit_sha |
Per-workspace indices ensure search results never cross workspace boundaries.
When indexing happens
| Event | Reindexes |
|---|---|
| Project import | All files of the new project |
| Project sync | File tree at the new HEAD |
| Documentation save | The single edited doc |
| Project delete | All entries are removed |
There is no "rebuild all indices" button in the UI. To force a rebuild, see below.
Manual rebuild
If indices get out of sync (e.g. after restoring a database backup that's newer than your Meilisearch volume):
Option 1 - Trigger sync per project
From each project page, click Sync. This reindexes all files at the current HEAD.
Option 2 - Wipe and let Glyph rebuild
docker compose stop meilisearch
sudo rm -rf volumes/meilisearch/*
docker compose start meilisearchThen trigger a sync on each project to repopulate indices. Documentation entries will be reindexed lazily on the next save.
Resource usage
Meilisearch is light: typically 100-500 MB of RAM, a few hundred MB of disk for the indices on most installs.
For very large monorepos (millions of LOC), the file content index can grow into the gigabytes. Adjust the host's available memory accordingly.
Master key
MEILISEARCH_KEY protects the Meilisearch HTTP API. Even though the port isn't exposed, set a strong random value - defense in depth costs nothing.
openssl rand -hex 32Changing MEILISEARCH_KEY requires restarting both the meilisearch and backend containers. The backend stores the key in memory at startup.
Replacing Meilisearch
Not supported. Glyph uses Meilisearch-specific features (typo tolerance, ranking rules, sortable attributes). Replacing it would require non-trivial code changes.
Backup
Meilisearch indices can be rebuilt from the database, so backing them up is optional but recommended for faster recovery:
tar czf meilisearch-$(date +%F).tar.gz volumes/meilisearch/To restore, stop the container, replace the volume contents, restart.