Skip to content

feat(search): add reusable vector search for online and batch workloads - #5263

Open
ddupg wants to merge 4 commits into
lance-format:mainfrom
ddupg:feat/ddu-324-batch-vector-search
Open

ddupg wants to merge 4 commits into
lance-format:mainfrom
ddupg:feat/ddu-324-batch-vector-search

Conversation

@ddupg

@ddupg ddupg commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds a reusable vector search session for online requests and incremental batch processing, sharing the same distributed search implementation. The existing vector_search() entry point uses the shared implementation for one-shot calls.

See #5292 for the use case and proposed API.

@github-actions github-actions Bot added the enhancement New feature or request label Jul 29, 2026
@ddupg
ddupg force-pushed the feat/ddu-324-batch-vector-search branch from a67abfd to d41faa1 Compare July 29, 2026 05:33
@ddupg
ddupg marked this pull request as ready for review July 29, 2026 08:15
@ddupg
ddupg force-pushed the feat/ddu-324-batch-vector-search branch 2 times, most recently from 652c1ba to 3565a70 Compare August 20, 2026 12:53
yanghua pushed a commit to lance-format/lance that referenced this pull request Aug 30, 2026
## Background

While implementing distributed batch vector search in
[lance-ray#5263](lance-format/lance-ray#5263), I
compared the indexed and flat search paths in Lance Core and found that
they used different multivector distance baselines.

For a query with `M` sub-vectors, the indexed path used:

```text
M - sum(max similarity)
```

while the flat path used:

```text
1 - sum(max similarity)
```

The results therefore differed by `M - 1`; for example, a perfect match
with `M = 2` returned `0` from the indexed path but `-1` from the flat
path.

## Changes

- For float metrics, directly compute `distance(Q, V) = sum_i min_j
d(q_i, v_j)`.
- For Hamming, use the same aggregation, `distance(Q, V) = sum_i min_j
hamming(q_i, v_j)`, without an outer `1 - ...` conversion.
- Add unit and end-to-end coverage for flat, indexed, and partially
indexed search paths.

## Testing

- `cargo test -p lance-linalg`
- `test_multivec_ann` and `test_multivec_search_paths`
@ddupg
ddupg force-pushed the feat/ddu-324-batch-vector-search branch 2 times, most recently from 82e8c4e to 484e17a Compare September 13, 2026 06:32
@ddupg
ddupg force-pushed the feat/ddu-324-batch-vector-search branch 2 times, most recently from dc7250f to df4a55b Compare September 15, 2026 10:02
@ddupg ddupg changed the title feat(search): support distributed batch vector queries feat(search): add reusable vector search for online and batch workloads Sep 15, 2026
@ddupg
ddupg force-pushed the feat/ddu-324-batch-vector-search branch from 6a4eb9a to d56190e Compare September 29, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant