Skip to content

In topic autocomplete, rank results by match relevance #881

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
gnprice opened this issue Aug 11, 2024 · 1 comment
Open

In topic autocomplete, rank results by match relevance #881

gnprice opened this issue Aug 11, 2024 · 1 comment
Labels
a-compose Compose box, autocomplete, attaching files/images
Milestone

Comments

@gnprice
Copy link
Member

gnprice commented Aug 11, 2024

In the initial implementation of #310 (in #627), we'll order the suggested topics purely by recency (see #627 (comment)). That matches zulip-mobile's behavior, and is enough to be quite useful.

In Zulip web, though, there's some further ranking: an exact match comes first, then prefix matches, then matches that start at a word boundary. (Plus prefix matches are further split by case-exact vs. case-insensitive.) See initialize_topic_edit_typeahead in web/src/composebox_typeahead.ts; and then follow the indirections to triage_raw in web/shared/src/typeahead.ts for the implementation.

I'm not sure all the nuances of that are good to copy — in particular the case behavior, which should perhaps just be all case-insensitive. But we should do either that or something like it.

The additional ordering should, like in web, be stable — results that have the same priority in this ranking should remain ordered by recency.

This is a post-launch issue because the zulip-mobile legacy app doesn't do this ranking.

@gnprice gnprice added the a-compose Compose box, autocomplete, attaching files/images label Aug 11, 2024
@gnprice gnprice added this to the Post-launch milestone Aug 11, 2024
@alya
Copy link
Collaborator

alya commented Aug 27, 2024

If we decide to get rid of the case-sensitive behavior, we might want to do the same for web.

Case-insensitive does seems especially helpful for mobile, where managing capitals vs. lowercase letters is often a bother.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-compose Compose box, autocomplete, attaching files/images
Projects
Status: No status
Development

No branches or pull requests

2 participants