Module Hub Beta

redisearch

High performance full text search engine

Overview:

redisearch implements a search engine on top of Redis, but unlike other Redis search libraries, it does not use internal data structures like sorted sets.

Inverted indexes are stored on top of Redis strings using the modules DMA method.

This allows much faster performance, significantly less memory consumption, and more advanced features like exact phrase matching, that are not possible with traditional Redis search approaches.

Quick Guide:

  1. Creating an index with fields and weights:
127.0.0.1:6379> FT.CREATE myIdx title 5.0 body 1.0 url 1.0
OK 

2. Adding documents to the index:

127.0.0.1:6379> FT.ADD doc1 1.0 title "hello world" body "lorem ipsum" url "http://redis.io"
OK

3. Searching the index:

127.0.0.1:6379> FT.SEARCH "hello world" LIMIT 0 10
1) (integer) 1
2) "doc1"
3) 1) "title"
   2) "hello world"
   3) "body"
   4) "lorem ipsum"
   5) "url"
   6) "http://redis.io"
© 2017 Redis Labs, Inc. All rights reserved.