Peter Söderbaum

Why we work with Elasticsearch

When you build e-commerce solutions with large amounts of products that also have a lot of text and properties that you want to be able to search among, then the requirements for the search engine you choose increase. To be able to provide lightning-fast and good search results to the customer, a high-performance and scalable search engine is required as a foundation of the solution. One solution we have chosen in several major customer projects is Elasticsearch.


Manage large amounts of data

Elasticsearch is an open source NOSQL DB search and analysis engine that can manage very large volumes of data. Elasticsearch is based on Lucene but adds opportunities to distribute the system over several nodes and works with the search engine via a JSon-based REST API.

An elastic system consists of a number of main components. A Node is a single server that stores the data. This Node is part of a Cluster. A Cluster is a collection of one or more Nodes and it is via the Cluster indexing and searching is done via the REST API. It is also possible to set up replication from one Cluster to another, this makes it possible to create, for example, a failover solution in the event that a Cluster becomes unavailable.

Furthermore, there is Index, which is a collection of Documents that are normally of the same type or closely related to each other. An Index is the key to lightning-fast searching among incoming documents and also handles how to search. Documents are the very basic form of information in Elastic and this is represented as JSon.

Finally, there is something called Shard that makes it possible to divide an index into several smaller parts, which means that a large index can be distributed over several nodes. It is also possible to create Replicas of these Shards to create redundancy. This is an important part of providing support for virtually unlimited data volumes.

The suite also includes Kibana, which is there to easily ask questions to Elasticsearch and to be able to traverse and visualize the data. In this application there are lots of ready-made visualizations such as histograms, line charts, pie charts, geomaps, time series, graphs and networks. In addition, there is support for using machine learning, among other things, to detect deviations in the data.

Powerful search engine with multiple customizations

Common uses for us are to design a data model for mainly product data and related properties to products to enable really good search options where interactive facets are shown to the user. Where these change based on the current product selection as the customer adds additional filters or searches based on text. We also often make adjustments in the actual text analysis to better find in the range and language the site has. Synonym management is also a common adaptation to improve the user experience.

We think that Elasticsearch is the right choice when you want a powerful search engine and product index where over time you want to be sure that you can adapt the solution exactly as you want. Feel free to contact us if you want to know more about our solutions.

Peter Söderbaum

Peter Söderbaum Business Developer e-commerce, Team Manager