From 170208d3e5432f04679bd3f530ca1ec22daf6b5e Mon Sep 17 00:00:00 2001 From: Sicherhaven Date: Fri, 10 Apr 2026 12:03:05 +0530 Subject: [PATCH] fix(search): include name field in EventListAPI full-text search title__icontains only searched the optional title column; most events are stored in the required name field, so Thrissur Pooram and similar events were invisible to the q= search filter. Co-Authored-By: Claude Sonnet 4.6 --- mobile_api/views/events.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile_api/views/events.py b/mobile_api/views/events.py index 7b9fedc..15a547e 100644 --- a/mobile_api/views/events.py +++ b/mobile_api/views/events.py @@ -244,9 +244,9 @@ class EventListAPI(APIView): if pincode_qs.count() >= MIN_EVENTS_THRESHOLD: qs = pincode_qs - # Priority 3: Full-text search on title / description + # Priority 3: Full-text search on title / name / description if q: - qs = qs.filter(Q(title__icontains=q) | Q(description__icontains=q)) + qs = qs.filter(Q(title__icontains=q) | Q(name__icontains=q) | Q(description__icontains=q)) if per_type > 0 and page == 1: type_ids = list(qs.values_list('event_type_id', flat=True).distinct())