Semantic search for your online shop: how to set it up
A semantic search engine finds the product even when the customer does not use the words in your catalogue: “cordless earphones” returns “Bluetooth headphones”. To set it up in a shop you need three pieces: the catalogue in a searchable format, a service that indexes it by meaning and a small intermediary on your server that runs the query.
By Joan Martorell
Which searches does a shop's built-in search get wrong?
The search that most platforms ship with compares words. It works when the customer types the same thing that is on the product page, and stops working in four very common cases:
| Type of search | The customer types | The catalogue says |
|---|---|---|
| Synonym | “cordless earphones” | “Wireless Bluetooth headphones” |
| Intent | “something to hang a picture” | “Wall plug and hook set” |
| Typo | “runing shoos” | “Running shoes” |
| Attribute | “large waterproof backpack” | “40-litre backpack with rain cover” |
In our measurements on a product catalogue, synonym and intent queries put the right product in first position in 89% and 100% of cases. The full data and its limits are in measured results.
What data does it need for each product?
In XEYE each product is an element with three fields, and each one does a different job:
- `text`: the name of the product as a customer would search for it. It is required and it is what is returned as the result.
- `description`: synonyms, uses and features. It feeds the search by meaning and is not shown.
- `params`: what your shop needs to render the result, such as the identifier, the URL, the price or the image. It is returned untouched with each result.
[
{
"text": "Wireless Bluetooth headphones with noise cancelling",
"description": "Cordless earphones for music, calls and sport. 30-hour battery.",
"params": {
"id": 1842,
"sku": "HP-BT-900",
"url": "/products/bluetooth-headphones-900",
"price": 89.9,
"image": "/img/hp-bt-900.jpg"
}
}
]
A tip that saves trouble: one product per element, with a short, specific text. Near-duplicate elements compete with each other and clutter the results. There are more recommendations in lists and elements.
How do I set it up, step by step?
- Export the catalogue from your platform to a JSON file in the format above.
- Create a list in the XEYE console, mark it as public and import the file.
- Launch the training. It computes the embeddings and, if you want, generates an AI description for each product.
- Test in the playground with real searches from your customers. It is free.
- Add an intermediary on your server: it receives the search from the browser, calls XEYE with your API key and returns the results. The key must never reach the browser.
- Render the results with the
paramsof each one: link, price and image.
The full code for each platform is available: Shopify, WooCommerce and Nuxt.
What does a semantic search engine not do?
It is worth knowing before you start, because it does not replace the whole search of a shop:
- It does not filter by price, size, stock or category. XEYE returns your parameters and you apply the filtering to the results.
- It does not sync the catalogue by itself. New products are imported and changes are edited in the console. Importing adds elements, it does not replace existing ones.
- It does not rank by business rules, such as featuring a product that is on promotion.
- It has no interface. You provide the search box and the list of results.
A combination that works well is using semantic search to find the product and your platform for everything else. If you need facets and automatic sync out of the box, see XEYE versus Algolia.
How much does it cost?
| Item | Example | Cost |
|---|---|---|
| First training with AI descriptions | Catalogue of 1,000 products | €5.60 |
| First training without AI | Any size | €0.30 |
| Searches through the API | 10,000 searches | €10 |
| Tests in the playground | Unlimited | Free |
There is no monthly fee. The details are in pricing.
How do I know if it is working?
- Collect the real searches from your shop, above all the ones that return nothing today, and try them in the console playground.
- When the first result is not the one you expected, improve the text or the description of that product.
- After changing products, launch a new training. You only pay for the AI on the ones that have changed.
Frequently asked questions
Do I have to change my shop platform?
- No. Semantic search is added alongside your shop. Your platform keeps managing products, prices and orders.
Does it work for small catalogues?
- Yes. In fact that is where it performs best in our measurements: with 10 and with 250 elements the expected element always appeared among the results.
Does every key the customer presses count as a search?
- Only if your code calls the API on every keystroke. The tutorials wait until the customer stops typing for 300 milliseconds, so a normal search is one or two calls.
What happens with new products before training?
- They can be found by text matching from the moment you add them. Search by meaning is enabled for them when you launch the next training.
Try it with your own data
Create an account, upload a list and run your first search in about five minutes. You start with €5 of credit, no card required.
Keep reading
- Semantic search in Shopify with XEYEAdd a search box that understands synonyms and typos to your Shopify store: export the products, train them in XEYE and connect the theme through a small proxy.
- Semantic search in WooCommerce with XEYEAdd semantic search to WooCommerce with a small plugin: export the products, train them in XEYE and query the API from WordPress without exposing the key.
- Semantic search versus keyword searchKeyword search compares letters and semantic search compares meanings. When each one gets it right, what hybrid search is and measured data.