Files
upstream-zulip/docs/subsystems/full-text-search.md
upstream-mirror 64898b2c79
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
2026-09-15 15:05:30 +05:00

3.1 KiB

Full-text search

Zulip supports full-text search, which can be combined arbitrarily with Zulip's full suite of narrowing operators. By default, it only supports English text, but there is an experimental PGroonga integration that provides full-text search for all languages.

The user interface and feature set for Zulip's full-text search is documented in the in-app "Search filters" reference which can be accessed from the Zulip app's gear menu.

The default full-text search implementation

Zulip uses PostgreSQL's built-in full-text search feature, with a custom set of English stop words to improve the quality of the search results.

In order to optimize the performance of delivering messages, the full-text search index is updated for newly sent messages in the background, after the message has been delivered. This background updating is done by puppet/zulip/files/postgresql/process_fts_updates, which is usually deployed on the database server, but could be deployed on an application server instead.

Zulip also supports using PGroonga 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.

Enabling PGroonga

All steps in this section should be run as the root user; on most installs, this can be done by running sudo -i.

  1. Alter the deployment setting:

    crudini --set /etc/zulip/zulip.conf machine pgroonga enabled
    
  2. Update the deployment to respect that new setting:

    /home/zulip/deployments/current/scripts/zulip-puppet-apply
    
  3. Edit /etc/zulip/settings.py, to add:

    USING_PGROONGA = True
    
  4. 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 users will be unable to send new messages until the migration finishes.

  5. Once the migrations are complete, restart Zulip:

    su zulip -c '/home/zulip/deployments/current/scripts/restart-server'
    

Disabling PGroonga

  1. Remove the PGroonga migration:

    su zulip -c '/home/zulip/deployments/current/manage.py migrate pgroonga zero'
    

    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.

  2. Edit /etc/zulip/settings.py, editing the line containing USING_PGROONGA to read:

    USING_PGROONGA = False
    
  3. Restart Zulip:

    su zulip -c '/home/zulip/deployments/current/scripts/restart-server'
    
  4. Finally, remove the deployment setting:

    crudini --del /etc/zulip/zulip.conf machine pgroonga