Skip to main content

Crate lapis_lattice

Crate lapis_lattice 

Source
Expand description

Embedded SQLite + FTS5 lattice for a Markdown vault.

Files on disk are the write source of truth. This crate only writes <vault>/.lapis/lattice.sqlite by default; Engine::open_in can keep the index in a caller-chosen directory instead. Search is FTS5 BM25; vectors are not in 0.2.

The database is stamped producer = "lapis-lattice" at creation and the stamp is asserted on open, so a path pointed at a foreign SQLite file (an agent-memory store, say) fails loudly instead of quietly mixing corpora.

Structs§

Analytics
Document
One row of the documents table. Wire casing belongs to the caller.
Engine
Open an index over a Markdown vault: <vault>/.lapis/lattice.sqlite by default, or in a caller-chosen directory with Engine::open_in.
Graph
Link-graph state. built is false before the first reindex, so “no edges yet” is distinguishable from “a vault with no links”.
GraphEdge
GraphNode
One indexed document, or one link target that resolves to nothing.
GraphSnapshot
Whole-vault link graph, the shape of schema/v0.3/graph-snapshot.schema.json.
Health
Hit
IndexReport
ListParams
Filters for the documents table (lapis list).
Neighbor
RefreshReport
What a refresh did: added, updated and removed notes, and what the semantic arm embedded this run (zero without an embedder).
Scope
The ignore rules for one vault, read once per walk.
SearchParams
Everything a surface can ask of search. Flags must not silently no-op.
SearchResult
StoredEmbedder
The embedding space recorded in an index, read without a provider round-trip.

Enums§

Error
Mode
Retrieval arm selection. The embedded engine is FTS-only in 0.2, so Hybrid runs BM25 alone and reports that in SearchResult::modalities; Vector is refused rather than silently downgraded.

Constants§

ANALYTICS_QUERIES
HTML
MARKDOWN
Values of the documents.kind column and the kind field on a search hit.
PRODUCER
Written into meta.producer at creation; asserted on open.
SNAPSHOT_NODE_CAP
Above this many nodes a snapshot keeps the highest-degree nodes and reports truncated: true. Under it there is no cap: a 20k-node vault still draws whole, and the renderer drops labels before it drops nodes.
YAML

Traits§

Embedder
Turns text into vectors. One embedding space per database.

Functions§

kind_for
The kind for a vault-relative path, or None when it is not indexable.

Type Aliases§

Result