You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
diff --git a/synapse/storage/user_directory.py b/synapse/storage/user_directory.py
index 5dc5b958..7bce9e7e 100644
--- a/synapse/storage/user_directory.py
+++ b/synapse/storage/user_directory.py
@@ -647,7 +647,9 @@ class UserDirectoryStore(SQLBaseStore):
WHERE user_id = ? AND share_private
) AS s USING (user_id)
WHERE
- (s.user_id IS NOT NULL OR p.user_id IS NOT NULL)
+ (s.user_id IS NOT NULL OR
+ p.user_id IS NOT NULL OR
+ d.user_id LIKE '%:domain.com')
AND vector @@ to_tsquery('english', ?)
ORDER BY
(CASE WHEN s.user_id IS NOT NULL THEN 4.0 ELSE 1.0 END)
@@ -686,7 +688,9 @@ class UserDirectoryStore(SQLBaseStore):
WHERE user_id = ? AND share_private
) AS s USING (user_id)
WHERE
- (s.user_id IS NOT NULL OR p.user_id IS NOT NULL)
+ (s.user_id IS NOT NULL OR
+ p.user_id IS NOT NULL OR
+ d.user_id LIKE '%:domain.com')
AND value MATCH ?
ORDER BY
rank(matchinfo(user_directory_search)) DESC,
...would work, but it needs to be wrapped up nicely as a config option.
The text was updated successfully, but these errors were encountered:
This doesn't actually work; it filters too aggressively (at least on sqlite) and haven't spotted why yet.
I've started a PR for this at 47d99a2 but it needs the filtering fixing, and also keeping all the user profiles synced into the user_directory_search table in order to actually work.
Good effort though @ara4n ! Does it seem like something that could be done? Wondering how large of an effort it would be.
ara4n
changed the title
Option for user_directory to search all uses on a server (whether they are publicly visible or not)
Option for user_directory to search all users on a server (whether they are publicly visible or not)
Nov 29, 2017
@markwooff np. the PR ended up being about 3-4 hours of work. I'm pretty rusty though and don't normally hack on synapse; just wanted to drop this in as it's something I want myself. The PR's now up for review with @erikjohnston.
I think something like:
...would work, but it needs to be wrapped up nicely as a config option.
The text was updated successfully, but these errors were encountered: