ALL COVERED TOPICS

NoSQL Benchmarks NoSQL use cases NoSQL Videos NoSQL Hybrid Solutions NoSQL Presentations Big Data Hadoop MapReduce Pig Hive Flume Oozie Sqoop HDFS ZooKeeper Cascading Cascalog BigTable Cassandra HBase Hypertable Couchbase CouchDB MongoDB OrientDB RavenDB Jackrabbit Terrastore Amazon DynamoDB Redis Riak Project Voldemort Tokyo Cabinet Kyoto Cabinet memcached Amazon SimpleDB Datomic MemcacheDB M/DB GT.M Amazon Dynamo Dynomite Mnesia Yahoo! PNUTS/Sherpa Neo4j InfoGrid Sones GraphDB InfiniteGraph AllegroGraph MarkLogic Clustrix CouchDB Case Studies MongoDB Case Studies NoSQL at Adobe NoSQL at Facebook NoSQL at Twitter

NAVIGATE MAIN CATEGORIES

Close

Redis and a Full Text Indexing Solution

The guys from PlayNice.ly, which are building a bug tracker that uses Redis for storing all app data (users, projects, bugs, comments, audit data, etc.), have posted recently ☞ here and ☞ here about their work to support search within their product.

While the general idea is to simply store the inverted index into Redis, there are a couple of interesting things to be noted:

  1. Redis native support for SET data type and its set operations (union, intersection, difference) makes working with Redis stored reversed indexes pretty handy
  2. While you might be tempted to use every term as an index key, this will not work with fuzzy searches (i.e. searches for the word “numbers” will not contain documents containing the word “number”). Using “smart keys” — the article mentions using phonetic algorithms for calculating the keys; another solution can employ stemming algorithms — will help you reduce the number of index keys and also to perform fuzzy searches
  3. Building a good API for working with a custom solution will make things feel more natural.

Anyways, before consider this problem completely solved there are a couple of additional things that you should keep in mind:

  1. index updates: there are many different scenarios in which you’ll have to update the inverted index and this can raise different problems starting with:
    1. the increased number of operations (writes explosion) and rountrips to the storage
    2. dealing with concurrent updates
  2. index size (or data explosion) : even if the number of keys in the index is limited, the total amount of data stored will grow over time with the number of source documents. Keeping in mind that Redis stores all data in memory the hardware requirements for your machine will be higher. The upcoming Redis version will help alleviate this issue by introducing Redis virtual memory about which you can read more here.

Full text indexing is definitely not a new problem in the NoSQL space and there are different approaches to tackle it. Pick yours carefully!