Think ElasticSearch Is Just for Search? Stretch Again!

Posted on the 11 September 2019 by Aben @appscrip

71 total views, 69 views today

Since the dawn of the internet age, 'searching' for things has virtually become a rocket science in itself. Google has come a long way in developing complex algorithms for serving its common internet users.

So, what about the enterprises or large-scale organisations?

On February 8, 2010, an open-source search engine called Elastic Search was released to meet this need.

What is ElasticSearch?

RDBMS works typically slowly as it has to churn through tons of date to find the search results.

Elasticsearch is a document-based system which stores, manages, and retrieves document-oriented or semi-structured data. Data is stored in JSON based Domain Specific query Language (DSL). It is also schema-less, a NoSQL database which uses Lucene search engine.

Its a great tool for document indexing and full text search. Its simple and powerful, making it the defacto standard for search integration in any web app.

Query DSL is designed to handle all real-world complex logic in a single query.

4 Powerful ElasticSearch Use Cases That Make it A Powerful Tool

1. Full Text Search

Elasticsearch has great support for text-analysis. Things like:

and relevance scoring are included and supported for many different languages.

E.g.

You search for " Teenage Karate Turtles" and end up with the results about " Teenage Mutant Ninja Turtles "

Elasticsearch also has built-in support for autocomplete and suggestions.

Why make your customer guess when you can help guide them to the information that you have?

2. E-Commerce / Faceted Navigation

Full-text search is great, but it's only a small part of what developers use it for. Elasticsearch is also great at counting.

This is really important for e-commerce applications where users are actively looking for products that fit their needs.

It's common to provide users with a search box like the above Google example. It's also common to give them aggregate information about the search results so they can quickly hone in on the item they want to buy.

The query below is a search for a "Camera". It also shows counts of results by brand, release date, and price range. As you can see, this query is a perfect fit for these types of use cases.

3. Logging and Analytics

Logging and Analytics, builds upon the first two cases discussed above.

Elasticsearch is horizontally scalable, which means it can do really well with large amounts of data if you are willing to shell out extra bucks for the hardware.

How Large?

It is common for organizations to deal in billions of documents across terabytes of data. If you pair Elasticsearch's horizontal scalability with it's ability to count well, then you have the foundation for a great Logging and Analytics tool.

Stream data in one end, and get charts and graphs out the other. Quick and efficient searches are facilitated because of the way Elasticsearch indexes the data.

How quick?

Real-Time. There will be some delay between when the document is taken in and when it's ready for return, but the ingestion and processing is quick enough that the system doesn't get backed up. There may be a 5 second delay. Given the proper hardware, that delay should stay constant.

The Elastic Company also provides a great tool, Kibana, for creating and managing visualizations built around the Elasticsearch API.

Example: A tool like DataDog which keeps track of the health of your infrastructure.

4. Monitoring & Notifications

Elasticsearch has support for " reverse-searches ", machine-learning, and notifications. This means that you can configure it to take actions on your behalf based on some pre-defined setup.

This plays well with the real-time aggregations, and it fits nicely with the use cases mentioned above.

Like when...

Wikipedia sends an alert when there is an unusual pattern of editing or searching.

Amazon sends an alert if a product is selling faster than expected

DataDog sends a notification when critical servers aren't performing well.

These are handy abilities as these notifications can be critical to an organization. It's especially nice to get this functionality "for free" with the tool that's already central to your products, like Elasticsearch.

Conclusion

Elasticsearch stands out from all its competitors as it is highly scalable and widely distributed in nature.

If you have a large volume of data and you want a faster search, then there is no way you can find anything which is as good as Elasticsearch.