element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
74 stars 12 forks source link

Aggregated room directory search #1444

Open notramo opened 3 years ago

notramo commented 3 years ago

Is your suggestion related to a problem? Please describe. I configured multiple servers in my room explorer.

Describe the solution you'd like If I want to search for a given term in the Matrix federation, I have to select each server one by one, enter the search term, and see if it has results.

Describe alternatives you've considered Element should query all the configured servers upon entering the search term, and aggregate the results.

Additional context image

t3chguy commented 3 years ago

Element should query all the configured servers upon entering the search term, and aggregate the results.

No, given that Element has to query via its homeserver anyway, the homeserver should do it. Plus there's the difficult issue of trust. What if Server A says #alias1 is !roomA but Server B says #alias1 is !roomB

notramo commented 3 years ago

No, given that Element has to query via its homeserver anyway, the homeserver should do it.

But it needs an UI to indicate what server has the given room in the directory, so it is not necessary to change server implementation. Element can query all the servers via the HS, but it should do the aggregation locally (especially given the following problem).

What if Server A says #alias1 is !roomA but Server B says #alias1 is !roomB

In this case, this should be indicated with red warnings. Without the aggregated solution, this wouldn't be even noticed. (The user joins the room when first found on any of the servers.)

t3chguy commented 3 years ago

The aggregation should be done by the server, would be much cheaper to do 1 API hit rather than N where N can be infinite.