DEV Community

Robin Kretzschmar
Robin Kretzschmar

Posted on

What do you use Elasticsearch for?

What is your real-world use case for Elasticsearch?
I spent some time with elasticsearch and want to use it with a good real-world example to learn more about it.

Top comments (4)

Collapse
 
theoutlander profile image
Nick Karnik

Here are a couple of real-world examples:

Google Search: You enter search terms and it returns documents related to those terms ranked by relevance. There's of course more to Google Search, but ElasticSearch supports many of those algorithms and is a generic document search engine. It comes very close in terms of the supported features and scalability (hence the term Elastic).

Yelp Search: You enter search terms that match some facets (type of business, location, name of business, etc) and it returns a list of matches and additional details about it (address, number, ratings & reviews, etc.)

Pretty much any site where you can search for information, you can use Elasticsearch in the backend to index data. The data needs to be large and complex enough to use Elasticsearch. Otherwise, it could be overkill as you can solve most basic problems via just in-memory/serialized data structures.

I tried to keep this explanation simple, but I'm starting to feel that I should write an article about how Elasticsearch / reverse-indexes work.

Collapse
 
darksmile92 profile image
Robin Kretzschmar

You are right, I did not thought of existing search engines.
Also true that the data needs to be complex enough to not overkill it with Elasticsearch.

I would love to read your article about Elasticsearch indexing and reverse-indexes!

Collapse
 
johnmunsch profile image
John Munsch

I have a forum filled with postings and comments for each. Likewise I have a set of file names and comments for each. It would be nice if users could do searches across all of those and find matches. But it's even better if they can filter based upon knowing a particular user posted the comment or that they're only interested in the file comments or the discussion comments.

All of that should be within Elasticsearch's domain.

Collapse
 
darksmile92 profile image
Robin Kretzschmar

That is a quite good example! Thank you for that one. I also like the way how you described it as a requirement :)
Will have a look into that one maybe setting up a small forum locally and try that one.