Commit 7f46f8c
Add vector-first Lance ANN path for Cypher vector rerank (#140)
## Summary
- Add a VectorSearch.use_lance_index(True) opt-in to run a vector-first
path when datasets are Lance datasets.
- When enabled, CypherQuery.execute_with_vector_rerank uses Lance ANN
(nearest) to get top-k rows for the vector label, then executes Cypher
on that reduced dataset.\n- Adds a Python test behind requires_lance to
validate the path.
## Notes
- This is an explicit opt-in and only applies when the Cypher query has
no WITH/WHERE clauses; otherwise it falls back to the existing rerank
behavior.
- Semantics can differ from candidate-then-rerank if you enable it on
filtered queries; the guard avoids that by default.
## Motivation
Using Lance datasets with ANN indices can significantly reduce latency
for GraphRAG hybrid retrieval on large datasets by avoiding full-table
reranking.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent b0e6268 commit 7f46f8c
3 files changed
Lines changed: 695 additions & 13 deletions
File tree
- crates
- lance-graph-python/src
- lance-graph/src
- python/python/tests
0 commit comments