Skip to content

feat: add price range and capacity filters to /search-events #158

@BigBen-7

Description

@BigBen-7

Description

SearchEventsRequest and filter_events_by_keywords only filter by event type, location, time, and general keywords. Users searching for "affordable concerts in Lagos" or "small intimate events" have no way to filter by price or venue capacity — two of the most common search criteria for ticket buyers.

Requirements & context

  • Add to SearchEventsRequest:
    • min_price: Optional[float] and max_price: Optional[float]
    • max_capacity: Optional[int] (useful for "intimate" events)
  • Update filter_events_by_keywords to apply these filters when present
  • The NLP extract_keywords function should detect price intent keywords: "cheap", "affordable", "free" → set max_price=0 or max_price=5000; "premium", "VIP" → set min_price=10000
  • Add the price hint detection to extract_keywords return dict as price_hints: { min_price, max_price }
  • Write tests for each new filter individually and in combination

Suggested execution

git checkout -b feat/search-price-capacity-filters
  • Update src/types_custom.py SearchEventsRequest
  • Update src/search_utils.py
  • Write tests

Guidelines

  • PR must include: Closes #[issue_id]
  • Timeframe: 48 hours

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or improvementsearchSearch and recommendations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions