Technology · Search

Elasticsearch — search that holds up across large ranges

Elasticsearch takes over the search when the database can no longer keep up: large ranges, filters across many attributes, typos, synonyms, weighting of results. We connect it to Shopware 6 and to portals, and we run it as well. The uncomfortable part: good search is mostly data quality and configuration. Technology on its own only delivers the wrong results quickly.

search service for shop and portal

What is Elasticsearch?

Elasticsearch is a search service in its own right: it holds a searchable copy of the data and answers queries with filters, typo tolerance and relevance ranking.

What we use Elasticsearch for

We use Elasticsearch where search through the database reaches its limit. That means shops with large ranges and many variants, B2B catalogues filtered across numerous technical attributes, and portals where people search with incomplete terms. In Shopware 6 the connection runs through the search integration provided for it, so that filters, sorting and category pages are all served from the same index.

Then comes the editorial work: synonyms for technical terms and everyday language, weighting of part number, title and description, handling of hyphens and measurements. Elasticsearch is also the basis for semantic search and for the retrieval methods that let language models draw on your own content — RAG. Anyone planning such an application is already halfway there with a well-kept search index.

How we work: index, data, operation

It starts not with the installation but with the mapping: which field is text, which is a filter value, which is a number to sort on. Then data quality. Missing manufacturers, inconsistent units, empty short descriptions — that feeds straight through into the result list. We review the product data before indexing and say what has to be cleaned up first. Index bad data and you get bad results quickly.

In operation it comes down to reindexing after data changes, to memory and heap settings, and to the question of what happens when the service fails. We set up a fallback to the database search so that a shop does not stop just because an index is being rebuilt. The service runs in managed hosting on our own servers in Germany, with monitoring of index status, memory and response times.

When you do not need Elasticsearch

With a few hundred products, Elasticsearch is rarely worth it. The database search in Shopware 6 copes, and the extra service costs memory, maintenance and attention — permanently, not just once at setup. A modest portal with clear navigation often needs a better structure rather than full-text search across everything. Search is no substitute for a category logic nobody designed.

When the search is reported as “bad”, we first check why. Often synonyms are missing, fields are weighted wrongly, or products carry no usable names. That can be fixed in the existing search and costs less than a new service. Only when range, filter depth or result quality demonstrably reach their limit do we talk about Elasticsearch. A well-run search index over unusable data stays unusable.

Frequently asked questions

From what range size is Elasticsearch worth it?

There is no fixed threshold, but with a few hundred products it is rarely worth it. What matters is less the number than the filter depth: anyone letting customers narrow down across many technical attributes, carrying variants and serving queries with typos and synonyms will reach the limits of database search quickly. We assess that against the actual range instead of putting a number out there.

Why does the search not find our products despite Elasticsearch?

Usually it is the product data, not the search technology. If product names are inconsistent, manufacturers are missing or customers use different words from the catalogue, a faster index does not help. We look at the search queries people actually type, add synonyms, correct the weighting of fields and name the gaps in the data that have to be closed in the PIM or the shop. Most of good search is made there, not in a configuration file.

What happens if Elasticsearch fails?

Without precautions the search fails, and in the worst case category pages and filters go with it. That is why Sharpness sets up a fallback to the database search and monitors index status, memory and response times. Reindexing runs so that the old index keeps serving until the new one is finished. The shop stays usable, even if the result quality is worse than usual for a short time.

Elasticsearch or OpenSearch — what is the difference?

OpenSearch is a fork of Elasticsearch that AWS started in 2021 after a licence change; since 2024 its governance sits with the OpenSearch Software Foundation under the roof of the Linux Foundation. Elasticsearch itself has been open source again under AGPLv3 since 2024. For search, filters and relevance the two behave very similarly, and the differences are in the details of operation. Which one is used is usually dictated by the application: Adobe Commerce uses OpenSearch from version 2.4.8, Shopware 6 supports both.

Elasticsearch: existing system or new build?

We also take over systems that were built elsewhere — after a look at the code and the hosting.

What else we build with

Call Start a project