What is Elasticsearch & Why Should My Site Use It?

What is Elasticsearch?

Think of Elasticsearch as a true search engine similar to Bing or Google however Elasticsearch is an open-source (Apache 2 license), distributed, RESTful search engine built on top of the Apache Lucene library. To speed up how data is “searched for”, Elasticsearch–the engine under the hood–utilizes a series of indexes and segments to make different associations of content.

So, why would I use it for my project?

One of the great things about Elasticsearch is that you can combine different types of data into your search indexes regardless of the type of data you are using; whether it is structured data, metrics, or in the WordPress world, Posts, Pages, Custom Post Types, Post Meta, Taxonomies, terms, etc.

Additional Benefits

  • Can analyze indexes of millions, if not billions, of records in seconds
  • Can allow for weighting of indexes
  • Can allow for synonyms and fuzzy matching
  • Incredibly quick results of full-page content due to inverted indices

How else can my visitors benefit?

Search as You Type / Search Auto-Complete: From a user experience standpoint, Elasticsearch has a powerful suggestion feature that provides autocomplete/search-as-you-type capabilities. This can be tied into the default on-site search of WordPress. This feature helps guide visitors to relevant results as they are typing, improving search precision.

Spelling Correction / Did You Mean Functionality: With the Term and Phrase suggesters within Elasticsearch, you can also guide visitors to the correct content in scenarios where they may not necessarily know what they are looking for or how to properly spell a term.

But how do those features help my visitors?

For our E-commerce clients, the benefits come in terms of assisting visitors through the buying journey. Whether it’s suggesting a different product based on incorrect spelling, fuzzy matching a product SKU (or multiple SKUs), or showing related products, these features help guide the user to find what they are looking for faster.

What’s Next?

In a future post, I’ll show a real-world example of how Linchpin has implemented this in one of our own projects, some of the great SAAS solutions out there, and some WordPress plugins that can help to get you started.

The great thing about Elasticsearch is that costs are coming down and there are more avenues for small and medium businesses to be able to take advantage of this amazing technology within their own websites.

On-Site Search Strategy

Aaron Ware

For nearly 20 years Aaron Ware has worked with leading brands, start-ups and everyone in between to develop innovative, highly interactive, feature-rich websites, and online apps.

| @aaronware