Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5282 from aaronraimist/user-directory
Browse files Browse the repository at this point in the history
Fix docs on resetting the user directory (#5036)
  • Loading branch information
hawkowl committed May 29, 2019
2 parents 540f40f + 0729ef0 commit 7ddbbc4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
1 change: 1 addition & 0 deletions changelog.d/5282.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix docs on resetting the user directory.
6 changes: 3 additions & 3 deletions docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1103,9 +1103,9 @@ password_config:
#
# 'search_all_users' defines whether to search all users visible to your HS
# when searching the user directory, rather than limiting to users visible
# in public rooms. Defaults to false. If you set it True, you'll have to run
# UPDATE user_directory_stream_pos SET stream_id = NULL;
# on your database to tell it to rebuild the user_directory search indexes.
# in public rooms. Defaults to false. If you set it True, you'll have to
# rebuild the user_directory search indexes, see
# https://github.com/matrix-org/synapse/blob/master/docs/user_directory.md
#
#user_directory:
# enabled: true
Expand Down
10 changes: 3 additions & 7 deletions docs/user_directory.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ who are present in a publicly viewable room present on the server.

The directory info is stored in various tables, which can (typically after
DB corruption) get stale or out of sync. If this happens, for now the
quickest solution to fix it is:

```
UPDATE user_directory_stream_pos SET stream_id = NULL;
```

and restart the synapse, which should then start a background task to
solution to fix it is to execute the SQL here
https://github.com/matrix-org/synapse/blob/master/synapse/storage/schema/delta/53/user_dir_populate.sql
and then restart synapse. This should then start a background task to
flush the current tables and regenerate the directory.
6 changes: 3 additions & 3 deletions synapse/config/user_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def default_config(self, config_dir_path, server_name, **kwargs):
#
# 'search_all_users' defines whether to search all users visible to your HS
# when searching the user directory, rather than limiting to users visible
# in public rooms. Defaults to false. If you set it True, you'll have to run
# UPDATE user_directory_stream_pos SET stream_id = NULL;
# on your database to tell it to rebuild the user_directory search indexes.
# in public rooms. Defaults to false. If you set it True, you'll have to
# rebuild the user_directory search indexes, see
# https://github.com/matrix-org/synapse/blob/master/docs/user_directory.md
#
#user_directory:
# enabled: true
Expand Down

0 comments on commit 7ddbbc4

Please sign in to comment.