Table of contents
1.
Introduction
2.
Administration guide for RediSearch 
2.1.
Persistence
2.1.1.
RDB Persistence 
2.1.2.
AOF Persistence
2.2.
Master/Slave Replication
3.
Cluster Support
4.
Administration Guide for RediSearch for upgrading it to RediSearch
4.1.
Limitation of Upgradation
5.
Frequently Asked Questions
5.1.
Define Redis?
5.2.
Redis is written in which language and which platform supports it?
5.3.
What do you comprehend from the administration guide for RediSearch?
5.4.
What do you understand by Master/Slave Replication?
5.5.
What makes Redis Popular?
6.
Conclusion
Last Updated: Mar 27, 2024
Easy

Administration Guide for RediSearch

Author Gaurav Joshi
2 upvotes

Introduction

Before playing any game, our first look is into the essential part of the game is the guidebook. Without knowing the game rules, no one can go ahead. The same is with the administration guide for RediSearch. It's the guidebook for developers working on Redis. Most of the developers working with Redis already know how beneficial it is that Redis supports all the important data structures. 


Suppose you are a software developer and use Redis due to its advantages, but you don't comprehend where to start and how to go ahead. To solve these problems, Redis comes with RediSearch, a source available in the Redis module that provides query ability, secondary indexing, and an Administration Guide for RediSearch, a full-text search for Redis. Before using any of these, developers need to understand the Administration Guide for RediSearch, which provides the explanatory written materials provided to the Licensee with the Administrator's use of the Software. So let's go ahead and learn about the administration guide for RediSearch.

Administration guide for RediSearch 

This section will discuss the general administration guide for RediSearch. Even though RedisSearch doesn't require any configuration to work, but few things which are worth noting when running RedisSearch on top of Redis.

Persistence

RediSearch supports persistence based on RDB and AOF. 

RDB Persistence 

The RDB persistence performs point-in-time snapshots of the dataset at specified intervals. Beyond the standard Redis RDB configuration, nothing special is needed for an RDB setup.

AOF Persistence

As of version 1.1.0 of Redis, the RedisSerach supports working with AOF-based persistence. It doesn't support the "classic AOF" mode, which uses AOF rewriting. Instead, it solely supports AOF with RDB preamble mode. Rewriting the AOF log creates an RDB file in this mode, which is then appended.

To enable AOF persistence with RediSearch, add the two following lines to your redis. conf:

append-only yes
aof-use-rdb-preamble yes

Master/Slave Replication

Redis Replication uses an asynchronous method for transferring data from the master to the slave. A single master node can have multiple slaves, and after receiving data, the slave acknowledges it. Redis support cascading replication for the interconnection of slave with one another. Enabling persistence options is a good option in the master and the slave nodes; otherwise, one must restart an instance to lose all data.

Every Redis has a replication ID consisting of a sizeable pseudo-random string and the offset value on the master, and this replication ID is the key replication process. Every byte streaming from master to slave offset is incremented.

MASTER-SLAVE REPLICATION

MASTER-SLAVE REPLICATION

On the flip side, slaves connect to their master using PSYNC for sending the replication ID and offsetting processed in the slave. In this way, the master node will need to send the needed incremental data.

RediSearch supports replication using a master/slave setup, and we use slaves for high availability. On top of that, slaves can also be used for searching, to load-balance read traffic.

Cluster Support

RediSearch doesn't work correctly if you try to use it on a cluster. The enterprise version of RediSearch, commercially available from Redis Labs, does support a cluster setup and scales to hundreds of nodes, billions of documents, and terabytes of data.

Administration Guide for RediSearch for upgrading it to RediSearch

 

RediSearch 2.0

RediSearch 2.0


Upgradation index configuration enables us to specify the legacy index for upgrading to RediSearch 2. X

All hash arguments are defined on the FT.CREATE command and the index name need to be specified (duly note that the only mandatory thing is the index name, the other arguments have a default value). 

 

Let us consider an example. You have a legacy index called IDX for RediSearch 2.0 for loading. First, we need to configure the following to the server at the start time:

Redis-server --load module research.so UPGRADE_INDEX IDX

 

Also, we need to specify the prefixes to follow.

For example, let us assume all the documents index start by IDX with the prefix IDX: the following will upgrade the legacy index IDX:

Redis-server --load module research.so UPGRADE_INDEX IDX PREFIX 1 IDX:

Limitation of Upgradation

The up-gradation process works behind the scenes as it redefines the index with the hash index description in the configuration and reindexes the data then. However, it has some limitations:

  • If NOSAVE is used, then up-gradation is impossible since the reindexing data does not exist.
  • If we are using multiple indices, we must ensure a way for RediSearch to identify which hashes belong to which index. We can do it either with a prefix or a filter.
  • If we have hashes that are not indexed, we will need to find a way, so RediSearch to identify only the hashes that need to be indexed.

Frequently Asked Questions

Define Redis?

An in-memory opensource data structure store used as a message broker, cache, database and streaming engine.

Redis is written in which language and which platform supports it?

Written in ANSI C language, Redis works on most POSIX systems like Linux, *BSD, and Mac OS X.

What do you comprehend from the administration guide for RediSearch?

Administration Guide for RediSearch provides software developers with the explanatory written materials provided to the Licensee with the Administrator's use of the Software. It's the guidebook for developers working on RediSearch.

What do you understand by Master/Slave Replication?

Redis Replication is an asynchronous method for transferring data from the master to the slave. A single master node can have multiple slaves, and after receiving data, the slave acknowledges it.

What makes Redis Popular?

Redis supports all the essential data structures and stores its data in the primary memory. That makes Redis very popular among most tech giants like Twitter, Github, Snapchat, Stack Overflow etc.

Conclusion

In this article, we have studied the Administration Guide for RediSearch in detail and covered the general administration guide for RediSearch. We expect that this article must have helped you enhance your knowledge on the topic of RediSearch

Also, visit our Guided Path in  Coding Ninjas Studio to learn about  Redis. If you are preparing for an interview, visit our Interview Experience Section and interview bundle for placement preparations. Upskill yourself in Ruby on RailsBackend Web TechnologiesHadoopSQL, MongoDB, Data Structures and Algorithms, JavaScript,  System Design, and much more!. 
To learn more, refer to Operational DatabasesNon- relational databasesMongoDBTop-100-SQL-problemsinterview-experience, DBMS Architecture, Big Data, RedisInstalling Redis StackRedis configurationRedis data types.

Please upvote our blogs if you find them engaging and helpful! 

We wish you all the best for your future adventures and Happy Coding!!!. 

Conclusion

Live masterclass