Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pgvector and_subfilter #193

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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