Skip to content
Snippets Groups Projects
Unverified Commit 4d4526ae authored by Jules Kuehn's avatar Jules Kuehn Committed by GitHub
Browse files

chore: bump vector-store-postgres (#12050)

add comments
parent 8eb59bdb
No related branches found
No related tags found
No related merge requests found
......@@ -359,10 +359,12 @@ class PGVectorStore(BasePydanticVectorStore):
from sqlalchemy import text
if filter_.operator in [FilterOperator.IN, FilterOperator.NIN]:
# Expects a single value in the metadata, and a list to compare
return text(
f"metadata_->>'{filter_.key}' {self._to_postgres_operator(filter_.operator)} :values"
).bindparams(values=tuple(filter_.value))
elif filter_.operator == FilterOperator.CONTAINS:
# Expects a list stored in the metadata, and a single value to compare
return text(
f"metadata_::jsonb->'{filter_.key}' "
f"{self._to_postgres_operator(filter_.operator)} "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment