Search code examples
c#rediselasticsearchnestbooksleeve

How to use Redis with ElasticSearch


I found NEST for ElasticSearch. But I did not realize how the relation between Redis and ElasticSearch. I'll build a social network and would like to know whether you have some parts Redis and some parts of ElasticSearch should be used or a combination of them.what part of the project i use Redis and which parts ElasticSearch use and which parts should be combined use.

I use C# , BookSleeve for Redis , ElasticSearch with NEST , ASP.NET MVC


Solution

  • There is exactly zero relationship between these two things. I suspect you may have gotten the wrong end of the stick in a previous conversation, where you were wanting to search inside an individual value in redis for uses of a work (this question: How to search content value in redis by BookSleeve). The point I was trying to make is that this simply isn't a feature of redis. So you have two options:

    • write your own word extraction code (stemmer, etc) and build an index manually inside redis
    • use a tool that is designed to do all of that for you

    Tools like ElasticSearch (which sits on top of lucene) are good at that.

    Or to put the question in other terms:

    • X asks "how do I cut wood in half with a screwdriver"
    • Y says "use a saw"
    • X then asks "how do I use a screwdriver with a saw to cut wood in half?"

    Answer: you don't. These things are not related.