Introduction
For shops that contain millions of different products, your enterprise requires an alternative to MySQL to provide an optimal user experience in terms of both functionality and speed. Elasticsearch is an open-source search engine, built to handle such scenarios, where a set of millions of entries needs to be queried in just a few milliseconds. Pimcore provides a seamless Elasticsearch integration that will greatly benefit your digital commerce experience.
The technological basis for Pimcore is provided by PHP and standard development frameworks such as Symfony. The database system uses Redis. The Pimcore commerce framework is modular, similar to microservice architectures. Pimcore allows retailers to combine the required functions in their software instance and does not burden the end product with the ballast of software components that are not used anyway. We have a demo shop, but otherwise, Pimcore acts as a pure commerce backend that can be connected to any user interface.
Our API offers search capabilities to allow merchants to provide a better shopping experience. Specialized and highly effective for searching, finding, and comparing the right products, it connects to search providers such as FINDOLOGIC, Fact-Finder, or Algolia. But the most recommended, native, and preferred integration is leveraging Elasticsearch. Why is that the case? Because like Pimcore, Elasticsearch is open-source. We share the firm belief that this is the best way to develop software and ensure ongoing success for our products, company, and community.
Improvements
- We refactored the whole indexing process and archived massive performance improvements by reducing database locks and using parallelization.
- When using Elasticsearch we removed the additional mockup cache layer for product listings and are using 100% Elasticsearch now. This improves performance, especially when the additional cache layer is not filled, and simplifies the system architecture.
- When changing the Elasticsearch mapping, a reindexing of the index was sometimes necessary. For that, we now utilize built-in features of Elasticsearch and reduced the reindex time for big search indices from hours to minutes.
- Pimcore now has out-of-the-box support for synonyms based on the Elasticsearch synonyms feature.
The Results
Dominik Geyer, developer at our solution partner Weblizards, will tell us a little bit more about the results they achieved with the latest improvements of Pimcore’s Elasticsearch integration.
How do you use Elasticsearch?
We use Elasticsearch for commerce solutions with product ranges of more than 1.000 items. The Ecommerce IndexService of Pimcore handles the product index, the product search, and product filtering.
What made you decide to use Elasticsearch?
The main reasons are strong performance, the extensive possibilities in aggregations (filters), and the flexibility in implementing any customer’s search requirement. Aspects such as the large community, great developer experience, and good documentation speak for the use of Elasticsearch. And of course, the out-of-the-box support of Pimcore played a big role in the decision.
Which results could you achieve with the latest improvements?
In a customer project with a product range of multiple million products, the optimizations led to enhanced scaling and the following results.
- Due to the parallelization and avoidance of locking, a complete reconstruction of the internal representation performs better by at least factor 10.
- Due to the use of the Elasticsearch reindexing API, a complete rebuild of the index now takes only a few minutes instead of hours.
- Due to the newly added synonym handling, customer updated synonyms can be deployed much faster.
- The administrative effort (monitoring, manual intervention…) was reduced to a minimum.