Installing RediSearch to enable fast E-commerce Search
Experimental
The E-Commerce module of Bravo Hub ERP optionally uses RediSearch to enable search functionality which is configurable via E Commerce Settings.
Once installed and configured, RediSearch will be used to charge the search functionality of the E-Commerce website. This includes features like fuzzy-word searching, autocomplete, results ranking and customizable field indexing.
Pre-requisites
Section titled “Pre-requisites”- Bravo Hub Framework + Bravo Hub ERP Setup
- Redis 6+
Installation Instructions
Section titled “Installation Instructions”$ git clone --recursive 1$ cd RediSearch$ sudo make setup # Remove `sudo` on macOS$ make buildPlease Note: the latest version of RediSearch requires Redis 7.1+, while the stable redis as on 01-Aug-2023 available in snap repos is 7.0. Therefore, Redis need to be compiled from source for Redissearch to be compatible with Redis.
Also note Bravo Hub ERP requires Redis 6+, therefore using Redis 7.1+ might break thinks. Use Redis 7.1+ with caution.
On successful completion of the above instructions, a redisearch.so binary file will be generated in the RediSearch/build directory.
Move this binary to the /etc directory and restart your Bravo Hub Server:
sudo mv build/redisearch.so /etc/Now, open the redis_cache.conf file located in the config directory (inside the bench directory). Add the following line before the save "" line and then restart bench server:
loadmodule /etc/redisearch.soThis will load the redisearch module at startup. You can check if the module was loaded successfully by running the following command in the redis-cli -p 13000 (assuming port as 13000 default port for redis in frappe config):
> MODULE LISTand search should be one of the modules.
You can also load the module on a running redis instance by running the following command in the redis-cli:
> MODULE LOAD /etc/redisearch.soWe placed the
redisearch.somodule in the/etcdirectory, but it can be placed anywhere in the file system. We have used this directory because in the future theloadmoduleline will be populated in the config file automatically and it will assume the binary is in the/etcdirectory.
More detailed instructions can be found here.