Skip to content

Backport "sandboxed de-duplicating HNSW vector format" to 10.x - #16493

Open
kaivalnp wants to merge 2 commits into
apache:branch_10xfrom
kaivalnp:backport-15979
Open

Backport "sandboxed de-duplicating HNSW vector format" to 10.x#16493
kaivalnp wants to merge 2 commits into
apache:branch_10xfrom
kaivalnp:backport-15979

Conversation

@kaivalnp

@kaivalnp kaivalnp commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

Backport #15979 to branch_10x

Add a sandboxed de-duplicating HNSW vector format (`DedupHnswVectorsFormat`) that stores each distinct full-precision vector once, shared across all documents and fields that reference it.

This format enables building and searching of multiple HNSW graphs backed by the same vectors, without duplicating them on disk. For example: a subset of vectors identified by a filter can be indexed into a dedicated HNSW graph for performant filtered vector search.

Fields are grouped by `(dimension, encoding)` and all vectors within a group are de-duplicated during flush and merge. Each field maintains an off-heap mapping from `field ordinal -> ordinal in group` to reference to the shared vector, and vector operations like scoring and lookup are indirected to it.

(cherry picked from commit 4a3ed97)
- Remove float16 functions
- Workarounds for unsupported Java language features
- Use equivalent 10.x patterns for missing functions
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