You can enable search indexing by selecting Search under System Settings, and then toggling Enable search.
Elasticsearch requires the following:
A running Elasticsearch server compatible with Review Board:
A version of the elasticsearch module that matches the major version of your Elasticsearch server.
Only one can be installed at a time. You will need to have the right version for the server you want to connect to.
As a convenience, Review Board provides the following wrapper packages:
For example, to install support for Elasticsearch 7.x, run:
$ pip install "ReviewBoard[elasticsearch7]"
Once you have everything set up, you can configure Elasticsearch in Review Board by providing the following fields:
- Elasticsearch URL:
The URL to your compatible Elasticsearch server.
- Elasticsearch index name:
The name of the Elasticsearch index that Review Board will use.
Review Board will attempt to perform a test search once you’ve saved your settings, in order to ensure that the server is reachable.
If your version of Elasticsearch is not compatible with Review Board or with the installed elasticsearch module, the test search may pass, but you may later experience issues indexing or searching.
When using Whoosh, the Search index directory field must be filled
out to specify the desired directory where the search index will be stored.
This must be writable by the web server. We recommend creating this within your
Scheduled Indexing vs. On-The-Fly Indexing¶
Whichever configuration you use, you will need to set up indexing. This can be done either with a scheduled crontab or on-the-fly.
Enabling on-the-fly indexing will cause Review Board to update the search index whenever a relevant change is made. Because of performance concerns, we recommend only using this with the Elasticsearch backend.
If you want to use scheduled indexes, you will need to set up a scheduled
command to run periodically to update the search index. On Linux or other
Unix-based systems with cron, you can install the provided
crontab file. This is available at
conf/cron.conf under your site
directory. For example, to install the crontab for the current user, type:
$ crontab /path/to/site/conf/cron.conf
We recommend doing this as the web server user, to ensure that permissions are correct to write to the index directory.
The default crontab will perform an index update every 10 minutes.
Whether you are using scheduled indexing or on-the-fly, you will need to perform one full index when you first enable search. To do this, type the following (as the web server user, if using Whoosh):
$ rb-site manage /path/to/site rebuild_index
For more information on generating search indexes, see the section on the rebuild_index and update_index management commands.
Users should now be able to use the search box located on any page. See the documentation on Full-Text Search to see what types of things you can search for.