Skip to content

debezium/dbz#2156 feat: implement unified metadata filtering API and …#13

Open
KMohnishM wants to merge 1 commit into
gsoc-week-5-milvusfrom
gsoc-week-6-metadata
Open

debezium/dbz#2156 feat: implement unified metadata filtering API and …#13
KMohnishM wants to merge 1 commit into
gsoc-week-5-milvusfrom
gsoc-week-6-metadata

Conversation

@KMohnishM

@KMohnishM KMohnishM commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

…adapter translations

Description

This Pull Request implements the first half of GSoC Week 6 objectives under tracking issue debezium/dbz#2156. It introduces structured metadata filtering capabilities across the Chroma, PGVector, and Milvus vector store backends, providing a unified Python dict interface to query filtered subsets of synchronized documents.

Key Changes

  1. Interface Contract Update:
    • Extended as_retriever signature in VectorStoreAdapter (base.py) to accept an optional metadata_filter: dict[str, Any] keyword argument.
  2. Adapter Translations:
    • Chroma: Maps dictionaries to Chroma filter formats. Combines with pre-existing search filter kwargs using Chroma's logical $and operator.
    • PGVector: Maps filters directly to Postgres filter dictionaries.
    • Milvus: Converts filters into boolean query expression strings (e.g. (category == 'books') and (in_stock == true)), merging them safely with existing expr query strings.
  3. Robust Verification & Testing:
    • Added unit/integration tests for filtering behavior across all three adapters.
    • Refactored the test suite to ensure compatibility across varying LangChain/Milvus document schema formats.

Verification Results

  • Ruff Quality Check: Passed (All checks passed!).
  • MyPy Type Safety: Passed (Success: no issues found in 39 source files).
  • Test Suite: Run and passed 86 tests:

@KMohnishM KMohnishM force-pushed the gsoc-week-6-metadata branch from 48ac441 to 6e0a654 Compare July 1, 2026 03:23
@KMohnishM KMohnishM force-pushed the gsoc-week-5-milvus branch from 7e827f5 to 8d9042a Compare July 1, 2026 14:11
@KMohnishM KMohnishM force-pushed the gsoc-week-6-metadata branch from 6e0a654 to 646ff04 Compare July 1, 2026 14:12
@KMohnishM KMohnishM force-pushed the gsoc-week-5-milvus branch from 8d9042a to d7ec66c Compare July 3, 2026 05:43
…adapter translations

Signed-off-by: KMohnishM <kmohnishm@gmail.com>
@KMohnishM KMohnishM force-pushed the gsoc-week-6-metadata branch from 646ff04 to 25e0aa4 Compare July 3, 2026 05:43
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