Skip to content

In topic autocomplete, rank results by match relevance #881

Open
@gnprice

Description

@gnprice

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-composeCompose box, autocomplete, attaching files/images

    Type

    No type

    Projects

    • Status

      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions