RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.85k stars 10.77k forks source link

Prioritize spotlight results by first matched fields #9809

Open TwizzyDizzy opened 6 years ago

TwizzyDizzy commented 6 years ago

Description:

Searching for b (or other chars or also combinations) returns results that do not contain the search query (at least not in the channel/username). This may have been the case in earlier versions - I haven't checked whether this was introduced in 0.62.0-rc.0.

Server Setup Information:

Steps to Reproduce:

Expected behavior:

Actual behavior:

screenshot from 2018-02-21 13 16 48

Relevant logs:

-

geekgonecrazy commented 6 years ago

seems to maybe have been a longer standing issue

sampaiodiego commented 6 years ago

spotlight searches on multiple fields.. it searches on fields defined by a setting called Accounts_SearchFields , which by default is username, name, emails.address..

so yes, this can lead to weird results, since we do not display all the fields we look for, but it is also useful at sometimes.

I think the point is we need to prioritize the results better and maybe display all the information we have looked for (also highlight them)

cardoso commented 6 years ago

What do you think @TwizzyDizzy ? :top:

Should we rename this issue to something like: "Prioritize spotlight results by first matched fields" ?

So we end up with users with matched usernames at the top, and the ones that matches only secondary fields like name and email at the bottom

Maybe we have to take in mind servers with "Show real name" option, and prioritize real name instead, because they're probably searching for it.

TwizzyDizzy commented 6 years ago

I see. That's in fact what I thought happens under the hood. I think, from an UX perspective, the paramount goal should be, that the user that is searching understands, why a result is shown.

I am not sure whether I want to jump on the "make it a profile preference"-train, so every user can determine for themselves which fields to match. For sure, you should prioritize by what the average user expects. If I think about it, I expect it to search in the channel names and in usernames (be it real- or username). And I actually don't want it to match anything else. My case. My opinion. This might differ across usecases.

Cheers Thomas

PS-0: is spotlight now the official wording for "search"? PS-1: issue subject: agreed, changed.

sampaiodiego commented 6 years ago

PS-0: is spotlight now the official wording for "search"?

if not official, it was its first name and still the endpoint name 😉

farhanakhtar24 commented 11 months ago

Hello @debdutdeb @sampaiodiego @TwizzyDizzy I would like to update the documentation according the issue #17203. Could someone please provide me with the location of the documents?

farhanakhtar24 commented 11 months ago

Hello @debdutdeb @sampaiodiego @TwizzyDizzy I would like to update the documentation according the issue #17203. Could someone please provide me with the location of the documents?

Should I attempt to update the developer documentation where the spotlight is currently documented, or should I create a new document in the user documentation to document the behavior specified in issue #17203?