Optionalefv3.6.2 HN-4 — embedding-model alias the HNSW index was built with (e.g. "multilingual" or "bge"). At search time we verify that the embedder used to encode the query produces vectors in the SAME vector space as the index. CRIT-1 (v3.6.1) fixed the build-side silent destruction; this is the corresponding search-side guard.
If the search-time embedder model doesn't match this alias, the
stored vectors and the query vector are from different vector
spaces — cosine returns garbage similarities. We throw instead of
returning garbage; the agent / user can correct the
--embedding-model flag and retry.
v2.13.0 — optional HNSW context. When passed, embeddingsSearch routes the k-NN lookup through the in-memory HNSW index (sub-10ms at any scale) instead of the O(n) brute-force cosine in EmbedDb.search().
rowByLabelis the label → source-row mapping established at HNSW build time (typically labels areembeddings.id, set inEmbedDb.getAllVectors()).