Skip to content

Describe vector search as the exact scan it is - #17

Closed
zlareb1 wants to merge 1 commit into
mainfrom
cleanup/exact-vector-search
Closed

zlareb1 wants to merge 1 commit into
mainfrom
cleanup/exact-vector-search

Conversation

@zlareb1

@zlareb1 zlareb1 commented Oct 10, 2026

Copy link
Copy Markdown
Member

No table has a vector-similarity (HNSW) index, but code and docs still read as if one served searches.

  • Removed LOOM_VECTOR_SEARCH_EF_SEARCH and LOOM_VECTOR_SEARCH_INDEX_FETCH_MULTIPLIER: both only tune an index. The settings fragment keeps vector_search_index_fetch_multiplier, which sizes the codes-first shortlist.
  • Removed the loom.vector_index.* gauges and the system.query_log scan the state probe ran to feed them.
  • Comments that described HNSW or ANN behaviour now describe the exact scan and the codes-first read. The bare-distance query shape and its guard test stay.
  • clickhouse.md gains "Why exact search": what Loom uses, why, the cost that grows (one large namespace), and the next step if it does (an index over that namespace's rows, adopted when a benchmark at that size beats the codes-first scan).

Tests: unit suite passes except test_insert_shared_embedding_writes_a_complete_builder_row, which needs the lemmatizer data and fails the same way on main without it.

🤖 Generated with Claude Code

No table carries a vector-similarity index, so the HNSW-only settings and
gauges configured and measured nothing; the docs now say why search is
exact and when that would change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zlareb1
zlareb1 marked this pull request as draft October 14, 2026 04:15
@zlareb1 zlareb1 closed this Oct 15, 2026
@zlareb1

zlareb1 commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

We can revisit this later. Ideally, we should support HNSW, but there are a few challenges:

  1. Very few namespaces will grow large enough to benefit from HNSW.
  2. We currently cannot selectively reindex those namespaces. Enabling HNSW for every namespace would unnecessarily reduce retrieval quality for users with smaller memory sets.
  3. Started a discussion with @shankar-iyer to explore this use case and possible solutions.

Closing this for now, as leaving the current behavior unchanged causes no harm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant