From 498064fcb6029b8680b551dd65c56f5e4adf725b Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Tue, 20 Jul 2021 20:38:29 +0530 Subject: [PATCH] docs: RediSearch Installation --- .../articles/installing-redisearch.md | 64 +++++++++++++++++++ .../v13/user/manual/en/setting-up/contents.md | 2 +- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 erpnext_documentation/www/docs/v13/user/manual/en/setting-up/articles/installing-redisearch.md diff --git a/erpnext_documentation/www/docs/v13/user/manual/en/setting-up/articles/installing-redisearch.md b/erpnext_documentation/www/docs/v13/user/manual/en/setting-up/articles/installing-redisearch.md new file mode 100644 index 000000000..da6b4b2a3 --- /dev/null +++ b/erpnext_documentation/www/docs/v13/user/manual/en/setting-up/articles/installing-redisearch.md @@ -0,0 +1,64 @@ +--- +title: Installing RediSearch to enable super fast Ecommerce Search +add_breadcrumbs: 1 +show_sidebar: 0 + +metatags: + description: The E-Commerce module of ERPNext uses RediSearch to enable superfast search functionality which is highly configurable via `E-Commerce Settings`. + keywords: frappe, erpnext, ecommerce +--- + + + +# Installing & Enabling RediSearch + +The E-Commerce module of ERPNext uses RediSearch to enable superfast search functionality which is highly configurable via `E-Commerce Settings`. + +Once installed and configured, RediSearch will be used to super 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 + +1. The normal Frappe Framework and ERPNext Setup + +2. Redis 6+ + +## Installation Instructions + +```bash +$ git clone --recursive https://github.com/RediSearch/RediSearch.git +$ cd RediSearch +$ sudo make setup # Remove `sudo` on macOS +$ make build +``` + +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 Frappe Server: + +```bash +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: + +```bash +loadmodule /etc/redisearch.so +``` + +This 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`: + +```bash +> MODULE LIST +``` + +and `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`: + +```bash +> MODULE LOAD /etc/redisearch.so +``` + +> We placed the `redisearch.so` module in the `/etc` directory, but it can be placed anywhere in the file system. We have used this directory because in the future the `loadmodule` line will be populated in the config file automatically and it will assume the binary is in the `/etc` directory. + +> More detailed instructions can be found [here](https://oss.redislabs.com/redisearch/Quick_Start/#building_and_running_from_source). diff --git a/erpnext_documentation/www/docs/v13/user/manual/en/setting-up/contents.md b/erpnext_documentation/www/docs/v13/user/manual/en/setting-up/contents.md index 05f1176e3..5711ccfbb 100755 --- a/erpnext_documentation/www/docs/v13/user/manual/en/setting-up/contents.md +++ b/erpnext_documentation/www/docs/v13/user/manual/en/setting-up/contents.md @@ -112,7 +112,7 @@ You'll find the global configuration options here, for module-wise setup, visit 1. [Set up Two Factor Authentication](/docs/v13/user/manual/en/setting-up/articles/setup-two-factor-authentication) 1. [Disabling Line Breaks in Print Format Sections](/docs/v13/user/manual/en/setting-up/articles/print-format-sections) 1. [Integrating ERPNext With Biometric Attendance Devices](/docs/v13/user/manual/en/setting-up/articles/integrating-erpnext-with-biometric-attendance-devices) - +1. [Enable RediSearch for E-Commerce Search](/docs/v13/user/manual/en/setting-up/articles/installing-redisearch) ## 3. Videos