Skip to content

Feat: Add label filter support in pgdiskann client#724

Open
EeshaaKhan wants to merge 3 commits intozilliztech:mainfrom
EmumbaOrg:feat/pgdiskann-label-filtering
Open

Feat: Add label filter support in pgdiskann client#724
EeshaaKhan wants to merge 3 commits intozilliztech:mainfrom
EmumbaOrg:feat/pgdiskann-label-filtering

Conversation

@EeshaaKhan
Copy link

This PR adds support for label-based filtering in pgdiskann client.

Changes introduced:

  • Added support for FilterOp.StrEqual to enable filtering by scalar string labels.
  • Introduced optional with_scalar_labels flag to create tables with an additional label column.
  • Updated table creation logic to conditionally include scalar label support.
  • Extended insert_embeddings to handle label data when enabled.
  • Implemented prepare_filter() to dynamically construct the WHERE clause based on filter type.
  • Unified search query generation through _generate_search_query() to support filtered and unfiltered search paths.
  • Existing numeric filtering (id >= value) and non-filtered search behavior remain unchanged.
Screenshot from 2026-02-13 11-53-39

@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: EeshaaKhan
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@EeshaaKhan
Copy link
Author

/assign @XuanYang-cn

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.

2 participants