Config is a fluent builder. It is immutable after open(), and a subset of its values become the durable identity of the database, persisted in the IDENTITY file.
Identity (frozen at first open)
Three values are durable: dimension, metric, and index type. Reopening with a conflicting value raises ConfigError.
db = elips.open(
"/var/lib/myapp/elips",
dimension=384,
metric="cosine", # "cosine" | "euclidean" | "dot"
index="graph", # "graph" (HNSW) | "exact"
)Indexes
graph is the default — a Hierarchical Navigable Small World graph backed by HierarchicalGraphIndex. exact performs a brute-force scan and is suitable for small vaults, test workloads, and ground-truth measurement. Both implement the same IndexPort contract; see Algorithms.
auto db = elips::open(
"/tmp/elips",
elips::Config{}
.dimension(128)
.metric(elips::Metric::cosine)
.graph_params({.M = 16, .ef_construction = 200, .ef_search = 64}));Durability
| Mode | Behaviour |
|---|---|
paranoid | Flush and fsync on every WAL append. |
standard | Flush on every append. |
relaxed | Buffer; flush at checkpoint and close. |
ephemeral | No WAL is attached. In-memory only. |
Persistence
Segmented storage is on by default. Disable it with Config::segmented_storage(false) to fall back to the single-file elips.snapshot format. Both formats are crash-safe; Storage & recovery walks the on-disk layout.
Embedders
New databases auto-attach the built-in local text embedder. Two explicit choices are supported:
Config.local_text_embedder(...)— a rehydratable local embedder. ELIPS restores it automatically on reopen viaTEXT_EMBEDDER.manifestand a deterministic artifact.Config.text_embedder(callable, ...)— a Python callable. Metadata is persisted, but reopening without providing the same callable causes text-first APIs to raiseConfigErrorrather than silently degrading.
Access mode
read_write takes an exclusive advisory lock — one writer per database. read_only takes a shared lock and rejects every mutation path with StorageError. Use read-only mode for shared-reader analytics or fan-out serving.
reader = elips.open("/var/lib/myapp/elips", access_mode="read_only")
print(reader.vault("documents").seek_text("alpha", top=1)[0].data)