![]() ![]() To do this, we’ll make a set for each word and then put the document set names as members. Next we need to invert this index and show which word is located in which document. We’ve also turned all the words lowercase. Notice that we’re giving each line its own set (ex1…) and then we’re adding multiple members to that set based on each word (even though it might looks we’re just adding the entire line, SADD is variadic, so accepts multiple members. Let’s break down these items into sets of words just limited by space for simplicity: > SADD ex1 redis is very fast > SADD ex2 cheetahs are very fast > SADD ex3 cheetahs have spots But on the contrary, Redis can be used to underpin a very novel full-text search engine. ![]() Let’s say you want to search a number of text documents-this may not be an obvious use case for Redis as it access via keys rather than tables. Additionally, this pattern is very interesting and can be generalized to other workloads for which RediSearch may not be ideal. However, in some environments, RediSearch is not available. ![]() The RediSearch module provides much higher performance than this pattern. Prior to the advent of modules, full-text search was implemented using native Redis commands. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |