- Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
When performing a prefix search, exact matches appear in the results but are not properly sorted to the top of the list. For example, when searching for "Wilma", the exact match "Wilma" should appear first, but currently appears somewhere in the middle or bottom of the results alongside longer matches like "Wilmaaaa" or "Wilmar".
Expected Behavior
- Exact matches should be prioritized and appear at the top of search results
- Shorter matches should rank higher than longer matches in prefix searches
- Results should be sorted by relevance (e.g., by field length)
Current Behavior
- All prefix matches are returned in arbitrary order
- Exact matches are not distinguished from partial matches
- No relevance scoring is applied to search results
Suggested Solution
Implement relevance scoring for search results:
- Sort by field length (shorter = more relevant)
- Prioritize exact matches over prefix matches
- Apply sorting consistently across single-field and multi-field searches
Impact
This affects the user experience when searching, as users expect exact matches to appear first in the results list.
Metadata
Metadata
Assignees
Labels
No labels