matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.79k stars 2.13k forks source link

Prioritize room aliases to room descriptions in search #9883

Closed DerMolly closed 3 years ago

DerMolly commented 3 years ago

Description

While searching for our room on matrix.org (#hedgedoc:matrix.org) the only search result is our dev room (#hedgedoc-dev:matrix.org), because the string #hedgedoc:matrix.org is included in the room description.

image

Steps to reproduce

I'd expect to first receive the room #hedgedoc:matrix.org as the first result instead of #hedgedoc-dev:matrix.org. At the very least the normal room should also be included in the result.

In the mean time we hot fixed this issue by replacing the room link with an alias from our website.

Version information

anoadragon453 commented 3 years ago

Synapse will search for rooms via their canonical alias, as well as the name and topic:

https://github.com/matrix-org/synapse/blob/fe604a022a7142157da7e90a40330beb2a11af7a/synapse/storage/databases/main/room.py#L281-L297

I noticed that #hedgedoc:matrix.org is not actually marked as published to the public room directory:

image

You'll need to do that before it shows up in the public room directory :)

anoadragon453 commented 3 years ago

That being said... it may be useful if Element Web would try to query details about any room IDs or aliases that are typed into the search box and show the results at the top of the list in a special section.

I suspect we may want to support peeking-over-federation beforehand though.

DerMolly commented 3 years ago

Thank you very much @anoadragon453. Should this issue be closed? Or do you want to keep it open?

anoadragon453 commented 3 years ago

I've made an issue on the Element web side to track the potential UI idea, but otherwise I don't think anything needs to be done on the Synapse side here. So closing the issue :slightly_smiling_face: