You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(search): improve search logic and add query validation
This commit enhances the HeadlineSearchBloc with two key improvements:
- Flexible Search: The search filter is updated to use a case-insensitive regex ($regex with $options: 'i'). This allows users to find headlines with partial word matches, rather than requiring the exact title.
- Performance Optimization: A guard clause is added to prevent searches for queries shorter than 3 characters. This reduces unnecessary load on the backend and provides a better user experience by avoiding searches on single letters or short fragments.
0 commit comments