New in Endora Commerce: a built-in CRM with sales opportunities See it →
Endora Commerce

Meilisearch integration

Meilisearch is the catalog search engine in Endora Commerce: a separate index for each sales channel, type-ahead suggestions and attribute filtering, with the buyer’s price always taken from the price list, never from the index.

Why does search run on a dedicated engine?

Meilisearch is an open-source full-text search engine written in Rust, which you can run yourself or buy as the Meilisearch Cloud service. In Endora Commerce it is part of the standard stack, next to PostgreSQL and Redis, not an add-on from a higher tier.

Three of its traits matter for a B2B catalog: typo tolerance, results returned as the buyer types, and filtering on any declared field. The platform targets a search response time under 200 ms at the 95th percentile, and the demo runs on a catalog of over 120,000 SKUs.

What goes into the index, and what deliberately does not

Every sales channel has its own index, so a distributor portal and a public storefront can hold different assortments and never see each other’s products. The index holds one document per product: SKU, name, description, type, categories, attributes and the URL of the primary image. The name is stored in the channel’s default language, including any content overrides set for that channel and language.

What can be searched and filtered is decided by attribute flags in the catalog. An attribute marked as searchable goes into the searched fields, one marked as filterable into the filter fields, and changing a flag refreshes the index settings. For select-type attributes the option label in the channel’s language is indexed as well, so a buyer typing “Czerwony” finds a product whose stored value is the key red.

The document carries no price. In B2B the price depends on the buyer, and one document per product cannot hold every organization’s price list. Meilisearch therefore returns the matching IDs, and the platform loads the products from the database, drops the ones this buyer is not allowed to see, and calculates the price from their price list. The post on the pricing engine covers that part.

How the index keeps up with the catalog

  • Creating, changing or archiving a product fires a catalog event that updates or removes a single document. The event travels through the same Redis queue that handles webhooks and email.
  • A worker process rebuilds the indexes in full at intervals. The interval is a setting, 10 minutes by default.
  • A full rebuild can be forced from the admin panel or with a CLI command that recreates every channel’s index from PostgreSQL.

So the index is not a source of truth. It can be deleted and built again; nothing gets lost.

What the buyer sees and what the admin sets

The storefront header has a search box with suggestions: after a short pause in typing a list of products appears, and it can be navigated with the arrow keys. The full results page is the same view as the catalog listing, with the same filters, pagination and sorting by relevance, date added or name. The form also works without JavaScript.

Search settings are separate for each channel:

SettingDefault
Number of products in the suggestions8
Minimum query length that triggers the popup3 characters
Hybrid searchoff

Every committed search phrase is recorded together with the channel and the number of results, including searches that returned nothing. Recording happens in the background and does not delay the storefront response.

When hybrid mode is switched on, the platform attaches an embedder to the channel’s index, and Meilisearch combines phrase matching with meaning-based matching. The embedder is any endpoint compatible with the OpenAI API: OpenAI itself, Azure OpenAI, or a locally run Ollama if catalog data must not leave your infrastructure. The admin panel will not enable the mode until a URL, a key and a model have been provided for the channel, and switching it off restores plain lexical ranking.

When Meilisearch does not answer

An engine outage does not block product writes and does not take the catalog down. The listing falls back to a PostgreSQL query: without typo tolerance, but the store keeps selling. The platform’s readiness probe checks the search engine along with the database and the cache.

Before go-live

On the Meilisearch side you need a running instance (your own or in Meilisearch Cloud), its URL and an API key, which go into the backend configuration. In production mode Meilisearch requires a master key to be set. The platform creates the indexes itself.

A few limits of the engine are worth knowing:

  • At most 10 words of a query are taken into account, so a long pasted technical description gets cut off.
  • A single search returns up to 1,000 documents by default.
  • By default one typo is accepted in words of 5 characters or more and two in words of 9 or more. This is engine behaviour described in the typo tolerance documentation, and it is worth testing on your own data if the catalog relies on part numbers that look alike.

Let’s find out what we can connect at your end

Book a free consultation. We will walk through your ERP, warehouse and sales processes, and show you what the integration path looks like step by step.

Michał Zabielski, founder and CEO of Endora

Michał Zabielski

Founder and CEO, Endora

We reply within one business day.