Skip to content

Commit

Permalink
fix: pgvector and_subfilter (#193)
Browse files Browse the repository at this point in the history
* fix: pgvector and_subfilter

* fix: exact match filter raise error instead of return value
  • Loading branch information
SebanDan authored Sep 17, 2024
1 parent 868caed commit d3113bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/clients/pgvector/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d3113bd

Please sign in to comment.