Skip to content

Support operator filters in query_by_relationship #18

@mgoldsborough

Description

@mgoldsborough

Problem

query_by_relationship only supports simple equality filters. Passing dict-valued filters (e.g., {"score": {"$gt": 5}}) now raises ValueError (fixed in #15). The search module already supports operator filters — query_by_relationship should delegate to the same logic.

Current Behavior

app.query_by_relationship("contact", "works_at", company_id, filter={"score": {"$gt": 5}})
# => ValueError: Operator filters (e.g., {'$gt': 5}) are not supported

Expected Behavior

Operator filters work the same as in search_entities.

Suggested Approach

Reuse the filter matching logic from upjack.search inside _matches_filter, or replace _matches_filter with a call to the search module's filtering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions