From 5e9b94a7519f5553d19a0c5e37e7f8cdc8440fe2 Mon Sep 17 00:00:00 2001 From: SebanDan Date: Wed, 11 Sep 2024 15:35:16 +0200 Subject: [PATCH 1/2] fix: pgvector and_subfilter --- engine/clients/pgvector/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/clients/pgvector/parser.py b/engine/clients/pgvector/parser.py index 159b8b80..30aeccea 100644 --- a/engine/clients/pgvector/parser.py +++ b/engine/clients/pgvector/parser.py @@ -13,7 +13,7 @@ def build_condition( if or_subfilters is not None and len(or_subfilters) > 0: clauses.append(f"( {' OR '.join(or_subfilters)} )") if and_subfilters is not None and len(and_subfilters) > 0: - clauses.append(f"( {' AND '.join(or_subfilters)} )") + clauses.append(f"( {' AND '.join(and_subfilters)} )") return " AND ".join(clauses) From 5e4330ea04acdf6190f088acbd46646225d75e4d Mon Sep 17 00:00:00 2001 From: SebanDan Date: Wed, 11 Sep 2024 16:52:34 +0200 Subject: [PATCH 2/2] fix: exact match filter raise error instead of return value --- engine/clients/pgvector/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/clients/pgvector/parser.py b/engine/clients/pgvector/parser.py index 30aeccea..938f39ba 100644 --- a/engine/clients/pgvector/parser.py +++ b/engine/clients/pgvector/parser.py @@ -18,7 +18,7 @@ def build_condition( return " AND ".join(clauses) def build_exact_match_filter(self, field_name: str, value: FieldValue) -> Any: - raise f"{field_name} == {json.dumps(value)}" + return f"{field_name} == {json.dumps(value)}" def build_range_filter( self,