From 4d4526ae11f7cdb270eaece26dbf9caa9efe5d58 Mon Sep 17 00:00:00 2001
From: Jules Kuehn <jk@jules.lol>
Date: Mon, 18 Mar 2024 13:33:39 -0400
Subject: [PATCH] chore: bump vector-store-postgres (#12050)

add comments
---
 .../llama_index/vector_stores/postgres/base.py                  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/llama_index/vector_stores/postgres/base.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/llama_index/vector_stores/postgres/base.py
index 01a166c265..3408ed9234 100644
--- a/llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/llama_index/vector_stores/postgres/base.py
+++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/llama_index/vector_stores/postgres/base.py
@@ -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)} "
-- 
GitLab