From d3113bd9c17c130e109f849e520f5e08502f3598 Mon Sep 17 00:00:00 2001 From: Dan <38852336+SebanDan@users.noreply.github.com> Date: Tue, 17 Sep 2024 16:15:06 +0200 Subject: [PATCH] fix: pgvector and_subfilter (#193) * fix: pgvector and_subfilter * fix: exact match filter raise error instead of return value --- engine/clients/pgvector/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/clients/pgvector/parser.py b/engine/clients/pgvector/parser.py index 159b8b80..938f39ba 100644 --- a/engine/clients/pgvector/parser.py +++ b/engine/clients/pgvector/parser.py @@ -13,12 +13,12 @@ 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) 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,