Skip to content

[Feature] Improve Country Search with Weighted Ranking in _filterCountries() #1937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kunalbedi-pfg
Copy link

@kunalbedi-pfg kunalbedi-pfg commented Jan 28, 2025

closes #1922

This PR enhances the country search functionality in _filterCountries() by implementing a weighted ranking strategy for search results. The new logic ensures that countries are displayed in the following order based on assigned weightage:

  1. Countries where the ISO2 code matches the search query exactly.
  2. Countries whose names start with the search query.
  3. Countries whose names contain the search query anywhere.
  4. Countries where the full dial code matches the query.
  5. Countries where the country initials match the query.

This update significantly improves search result relevance and user experience.

@kunalbedi-pfg kunalbedi-pfg changed the title enhanced country search functionality Improve Country Search with Weighted Ranking in _filterCountries() Jan 28, 2025
@kunalbedi-pfg kunalbedi-pfg changed the title Improve Country Search with Weighted Ranking in _filterCountries() [Feature] Improve Country Search with Weighted Ranking in _filterCountries() Jan 28, 2025
@kunalbedi-pfg kunalbedi-pfg marked this pull request as ready for review January 28, 2025 11:57
@kunalbedi-pfg
Copy link
Author

@jackocnr - I hope you’re doing well. When you have a moment, could you kindly review this PR? It is currently blocking our progress, and we would greatly appreciate your feedback. Please let us know if any changes are required, or if everything looks good, we would appreciate your approval.

@kunalbedi-pfg
Copy link
Author

@jackocnr - I hope you’re doing well. Could you kindly review this PR as soon as possible as it is currently blocking our progress, and we would greatly appreciate your feedback. Please let us know if any changes are required, or if everything looks good, we would appreciate your approval. Thank you!

@jackocnr
Copy link
Owner

Hi there, thanks for putting this together - I look forward to reviewing this and hopefully getting it merged and released ASAP. Unfortunately, I have very limited time to commit to open-source over the next month or so, due to life commitments. So most likely I will only get to this in late March. Apologies for the delay. You shouldn't let this block you though - you should just switch to using your version for now, and then later when we get this merged into master, you can switch back again.

@kunalbedi-pfg
Copy link
Author

Sure, thank you for your comment. We will wait for late march for this to get merged.

@kunalbedi-pfg
Copy link
Author

Hi @jackocnr - Just wanted to follow up on this PR as it's late March now. Whenever you get a chance, we'd really appreciate your review and feedback. Please let us know if there's anything we can do to help move it forward. Thanks again!

@kunalbedi-pfg
Copy link
Author

kunalbedi-pfg commented Apr 2, 2025

Hi @jackocnr

Just wanted to follow up again as we haven’t heard back yet. We completely understand you may still be busy, but when you get a moment, we’d really appreciate your review on this PR. Please let us know if there’s anything we can do to assist or make things easier. Thanks again for your time!

@kunalbedi-pfg
Copy link
Author

Hi @jackocnr

Just wanted to follow up again as we haven’t heard back yet. This PR is quite important for us, as we’re currently facing an accessibility issue in our project that depends on this fix. We understand you have a lot on your plate, but if possible, could we request a time-bound review? We’d really appreciate any guidance or feedback if further changes are needed.

Looking forward to hearing from you.

@kunalbedi-pfg
Copy link
Author

Hii @jackocnr

Just checking in again on this PR. Since it's been a while since our last follow-up. We wanted to kindly ask if there's any update or timeline you could share. We are egger to move forward and happy to make any additional changes if needed. Please let us know if there's anything more we can do on our end.

Thanks for your attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Support for searching countries by filtering as you type, and/or by abbreviations
2 participants