mirror of https://github.com/zulip/zulip.git
docs: Reword pgroonga sections.
These were somewhat stilted as originally written; reword.
This commit is contained in:
parent
500f92169e
commit
4cca1a2076
|
@ -25,75 +25,62 @@ updating is done by
|
|||
deployed on the database server, but could be deployed on an
|
||||
application server instead.
|
||||
|
||||
## An optional full-text search implementation
|
||||
## Multi-language full-text search
|
||||
|
||||
Zulip now supports using [PGroonga](https://pgroonga.github.io/) for
|
||||
full-text search. PGroonga is a PostgreSQL extension that provides
|
||||
full-text search feature. PostgreSQL's built-in full-text search
|
||||
feature supports only one language at a time (in Zulip's case,
|
||||
English). PGroonga supports all languages simultaneously, including
|
||||
Japanese, Chinese and so on, all at once. We expect to migrate
|
||||
Zulip's full-text search to only support PGroonga once we have tested
|
||||
this new extension fully.
|
||||
Zulip also supports using [PGroonga](https://pgroonga.github.io/) for
|
||||
full-text search. While PostgreSQL's built-in full-text search feature
|
||||
supports only one language at a time (in Zulip's case, English), the
|
||||
PGroonga full-text search engine supports all languages
|
||||
simultaneously, including Japanese and Chinese. Once we have tested
|
||||
this new backend sufficiently, we expect to switch Zulip deployments
|
||||
to always use PGroonga.
|
||||
|
||||
The following processes should be executed as the root user. Run:
|
||||
### Enabling PGroonga
|
||||
|
||||
sudo -i
|
||||
All steps in this section should be run as the `root` user; on most installs, this can be done by running `sudo -i`.
|
||||
|
||||
### How to enable full-text search across all languages
|
||||
1. Alter the deployment setting:
|
||||
|
||||
This section describes how to enable using PGroonga to back the
|
||||
full-text search feature.
|
||||
crudini --set /etc/zulip/zulip.conf machine pgroonga enabled
|
||||
|
||||
To install PGroonga, add `pgroonga = enabled` in the `[machine]`
|
||||
section in `/etc/zulip/zulip.conf`:
|
||||
|
||||
[machine]
|
||||
...
|
||||
pgroonga = enabled
|
||||
|
||||
And then run as root:
|
||||
1. Update the deployment to respect that new setting:
|
||||
|
||||
/home/zulip/deployments/current/scripts/zulip-puppet-apply
|
||||
|
||||
Then, add `USING_PGROONGA = True` in `/etc/zulip/settings.py`:
|
||||
1. Edit `/etc/zulip/settings.py`, to add:
|
||||
|
||||
USING_PGROONGA = True
|
||||
|
||||
And apply the PGroonga migrations:
|
||||
1. Apply the PGroonga migrations:
|
||||
|
||||
su zulip -c '/home/zulip/deployments/current/manage.py migrate pgroonga'
|
||||
|
||||
Note that the migration may take a long time, and you can't send new
|
||||
messages until the migration finishes.
|
||||
Note that the migration may take a long time, and users will be
|
||||
unable to send new messages until the migration finishes.
|
||||
|
||||
Once the migrations are complete, restart Zulip:
|
||||
1. Once the migrations are complete, restart Zulip:
|
||||
|
||||
su zulip -c '/home/zulip/deployments/current/scripts/restart-server'
|
||||
|
||||
Now, you can use full-text search across all languages.
|
||||
|
||||
### How to disable full-text search across all languages
|
||||
### Disabling PGroonga
|
||||
|
||||
This section describes how to disable full-text search feature based
|
||||
on PGroonga.
|
||||
|
||||
If you want to fully remove PGroonga, first you need to remove the
|
||||
PGroonga column (as above, this will take a long time and no messages
|
||||
can be sent while it is running). If you intend to re-enable PGroonga
|
||||
later, you can skip this step (at the cost of your Message table being
|
||||
slightly larger than it would be otherwise).
|
||||
1. Remove the PGroonga migration:
|
||||
|
||||
su zulip -c '/home/zulip/deployments/current/manage.py migrate pgroonga zero'
|
||||
|
||||
Then, set `USING_PGROONGA = False` in `/etc/zulip/settings.py`:
|
||||
If you intend to re-enable PGroonga later, you can skip this step,
|
||||
at the cost of your Message table being slightly larger than it would
|
||||
be otherwise.
|
||||
|
||||
1. Edit `/etc/zulip/settings.py`, editing the line containing `USING_PGROONGA` to read:
|
||||
|
||||
USING_PGROONGA = False
|
||||
|
||||
And, restart Zulip:
|
||||
1. Restart Zulip:
|
||||
|
||||
su zulip -c '/home/zulip/deployments/current/scripts/restart-server'
|
||||
|
||||
Now, full-text search feature based on PGroonga is disabled. If you'd
|
||||
like, you can also remove the `pgroonga = enabled` line in
|
||||
`/etc/zulip/zulip.conf` and uninstall the `pgroonga` packages.
|
||||
1. Finally, remove the deployment setting:
|
||||
|
||||
crudini --del /etc/zulip/zulip.conf machine pgroonga
|
||||
|
|
Loading…
Reference in New Issue