Documentation - Redise Pack

A guide to Redise Pack installation, operation and administration

open all | close all

Quick Start with RediSearch

Note: This page only pertains to Redis Enterprise Pack v5.0 Preview.

For this quick start, you will need the following:

Add RediSearch Module to Redise Pack Cluster

Before doing anything, you must download and install a utility

You will need a few things:

  1. Python must be installed
  2. pip – for python package installation
    For ubuntu:

    $ apt-get install python-pip

    For RHEL/Centos:

    $ yum install python-pip
  3. The utility
    $ pip install git+

Set up environment variables

$ export RL_USER=""
$ export RL_PASS="mypassword"

Download the module

$ curl -O

Install the module into the cluster

$ curl -k -u "<admin-username>:<password>" -F \
"module=@/<path-to-file>/" \

Lastly, create a simple database which enables RediSearch:

$ curl -k -X POST -u "<admin-username>:<password>" -H "Content-Type: application/json" \
-d '{ "name": "test2", "port": 12544, "version": "4.0", "memory_size": 1000000, "type": "redis", "module_list":["c7f15d6fc15b2d5324d2a5e38f667032"],
"module_list_args":["",""] }' http://<your-rp-cluster>:8080/v1/bdbs

Creating Indexes
Let’s create a new index called “myidx”. When you define the index, you must pass in the structure of the data you will be adding to the index. In this example, we have 3 things we input, the title, body, and url. In this example, we have three TEXT and one NUMERIC values. The title has a weight of 5.0.> FT.CREATE myIdx SCHEMA title TEXT WEIGHT 5.0 body TEXT url TEXT value NUMERIC

Add info to test index

Now add some data to this index. We will add an object which key will be doc1 and then adds a title of “hello world”, body of “my favorite object”, and url of “” to the object as follows:> FT.ADD myIdx doc1 1.0 FIELDS title "hello world" body "My first object" url ""

Search the Index
Do a search on this index for any object with the word “first”:> FT.SEARCH myIdx "first" LIMIT 0 10
1) (integer) 1
2) "doc1"
3) 1) "title"
2) "hello world"
3) "body"
4) "My first object"
5) "url"
6) ""

Drop the Index
Now that we are done with it, we can drop the index.> FT.DROP myIdx

Auto-Complete and Search Engine Suggestions
Let’s add a suggestion for the search engine to use> FT.SUGADD autocomplete "hello world" 100

Make sure the suggestion is there:> FT.SUGGET autocomplete "he"
1) "hello world"