fix pgvector metadata filtering (parser + wire-up) - #293
Open
Goodnight77 wants to merge 4 commits into
Open
Conversation
tellet-q
self-requested a review
June 11, 2026 09:37
tellet-q
requested changes
Aug 19, 2026
tellet-q
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the PR!
Right now this code is a dead one, nothing executes it. So, the change is only required for possible future use. Apart from that it requires extension, alone it won't parse. json.dumps(value) renders a string as "Shoes", and double quotes in Postgres mean a quoted identifier, so you'd still get ERROR.
Author
|
@tellet-q
Tested against a real pgvector container, filters return correct results |
# Conflicts: # engine/clients/pgvector/configure.py
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
description
Fix exact-match filter in pgvector parser and wire up filtered search
Previous version used
json.dumps(value)for the filter value, which quotes strings with ", and Postgres reads double quotes as an identifier, not a string literal, so filtered queries still failed. Also, the parser was never called fromsearch_one, so none of this ranThis PR:
(Jsonb(value))instead of string-embedding themrecord.metadatain it on uploadsearch_oneand applies the resultingWHEREclauseTested against a real
pgvector/pgvector:pg16container exact-match and range filters return correct rows