Skip to content

[python] Fix IVF-PQ searches with sparse filters - #10726

Open
QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:ivfpq-search-fix
Open

QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:ivfpq-search-fix

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

Single-query Python Vindex searches used a scalar FFI that rejects results shorter than K when filters include live NULL vectors.

Reuse the existing batch API for single queries and singleton batches, preserving score conversion and Python/Native separation.

Tests

  • Focused suites: 338 passed, 111 skipped. Native extension unavailable locally.
  • 29 regression cases passed with Native imports blocked.
  • Flake8, license headers, Python 3.6 grammar and diff checks passed.

Use the existing Vindex batch API for single queries and singleton batches
so filters containing live NULL vectors can return fewer hits than requested.
Keep Python execution independent of the Native backend and preserve the
existing score conversion and invalid-ID filtering.

Add real SDK and deletion-vector regressions for sparse and empty results.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
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