Semantic search and intent-based systems
What is semantic search? How vector and hybrid search work in Meilisearch, what they do for online shops and chatbots, and how we build it in Laravel.
- Published
- Updated
- Reading time
- 9 min
WaterShield Pro TrailNorheimNOK 1,89097 %
AllWeather MarathonStormTechNOK 1,45094 %
UltraGrip Storm RunnerNorheimNOK 2,25091 %
AquaFlex RacerRunLabNOK 1,68087 %
comfortable→Good cushioningwaterproof→Waterproof materialsrunning shoes→Trail & roadrain→Gore-Tex / sealed seams- Response time
- 38ms
- Relevance
- 94%
- Products indexed
- 847K
- response time Meilisearch advertises for search-as-you-type
- <50 ms
- faster vector search with Hannoy in Meilisearch's own test
- 7×
- more searches ending in a purchase at Bookshop.org
- +43%
- semanticRatio for an online store and a support bot
- 0.3–0.9
In short
- Semantic search turns text into vectors and matches on meaning, so a search for "something to sit on" also returns chairs and stools.
- Hybrid search in Meilisearch combines keyword and vector search, so exact matches such as part numbers still work while synonyms and typos get caught too.
- Meilisearch is written in Rust, advertises responses in under 50 milliseconds and connects to Laravel through Scout or to WooCommerce through its API.
From keywords to intent
Semantic search understands what the user means instead of only looking for the same words. Text is turned into vectors (embeddings), and the system finds the matches closest in meaning, so a search for "something to sit on" also returns "chair" and "stool". Meilisearch, written in Rust, has vector search built in and can combine it with ordinary keyword search in the same request.
For a long time, site search meant matching characters. When a user types a word, the system looks for exactly that string in the database. It's fast, but the system has no idea what the words mean. It falls short when the customer and the shop use different words for the same thing, or when a word means different things in different contexts.
The customer then gets an empty results page even though the product exists, simply because they used the "wrong" word. In the US, Google Cloud and Harris Poll estimated that failed searches cost retailers more than $300 billion a year, and 76% of respondents said a failed search had cost the store a sale (Google Cloud, 2021).
Semantic search and vector databases used to be reserved for the largest companies. Today they're off-the-shelf technology, used in everything from shop search to chatbots and recommendations.
In this case study we explain how semantic search works, using Meilisearch as the example, and how we build it with frameworks like Laravel.
From words to meaning
To see what semantic search fixes, start with where traditional search falls short.
The lexical gap
Traditional search engines use an inverted index. Search for "car", and the engine looks for exactly that combination of letters. If a document only says "vehicle", the search won't find it. This is called the lexical gap.
In an online shop, that costs sales. A customer searching for "warm winter jacket" might get no results for a "lined parka", even though that's exactly what they want. With ordinary search, the customer has to guess the words the product text uses. Semantic search removes the guessing.
Vectors: meaning as numbers
The answer is vectors, also called embeddings. Machine learning models such as OpenAI's text-embedding-3 turn text, images or audio into long sequences of numbers. We compare which models work best for Norwegian in RAG explained.
Picture an enormous map with many dimensions. "Cat" and "dog" end up close together because they have a lot in common: pets, four legs, fur. "Car" ends up in a different neighbourhood altogether.
When a user searches, the query becomes a point on the same map, and the system finds the nearest points (nearest neighbour search). That's how a search for "something to sit on" returns "chair", "sofa" and "stool" without anyone adding synonyms by hand.
- 1chair0.88
- 2sofa0.86
- 3stool0.83
1,536 values
Similarity is the cosine between the query vector and the word vector. 1 means the same meaning.
Meilisearch: architecture built for speed
Meilisearch is a search engine built for user-facing search. Its main competitor, Elasticsearch, is written in Java and widely used for log analysis and large data volumes, and it has its own vector and hybrid search as well (Elastic). Meilisearch is written in Rust and built for one thing: fast, relevant results.
Why Meilisearch?
Rust and steady performance. Meilisearch doesn't run on the Java Virtual Machine, so it avoids the pauses that the JVM's memory management can cause. Meilisearch advertises responses in under 50 milliseconds for search-as-you-type (Meilisearch).
Hybrid search in one engine. Vector search is built into Meilisearch, so you don't run one system for text and another for vectors. The same request can combine keyword matches and matches by meaning.
Vectors on disk instead of in memory. Many vector databases need the whole index in memory to be fast enough. Meilisearch's vector store, Hannoy, keeps the graph on disk rather than in RAM (Meilisearch). That makes large datasets cheaper to host.
From trees to graphs
In 2025, Meilisearch replaced its vector store Arroy, which is tree-based, with Hannoy, a graph-based HNSW implementation. Hannoy has been the default since version 1.29 in December 2025. In Meilisearch's own test on 1 million vectors with 1,536 dimensions, indexing went from 956 to 153 seconds and search from 228 to 31 milliseconds (Meilisearch, 2025):
With compressed vectors, search time went all the way down to 13 milliseconds. For search that updates as the user types, the difference between 230 and 30 milliseconds is clearly noticeable.
Hybrid search: precision and understanding
Pure vector search can be too loose. If a customer searches for the part number "XJ-900", vector search might return "XJ-800" because the products are similar. Here precision matters more than understanding, and that's why you need hybrid search.
How the results are merged
Meilisearch runs the keyword search and the vector search and merges the results by weighted score: keyword scores count with 1 minus semanticRatio, and vector scores with semanticRatio (Meilisearch). The keyword side doesn't use BM25; it uses Meilisearch's own ranking rules (Meilisearch).
Because Meilisearch merges scores, it keeps the information about how good each match was. Other methods, such as Reciprocal Rank Fusion (RRF), only look at the position in each list. Elasticsearch and OpenSearch now offer both.
// request { "q": "warm winter jacket", "hybrid": { "semanticRatio": 0.5, "embedder": "default" }, "showRankingScore": true }
Matches the words in the title and description.
Matches products that mean the same thing, even without the words.
- #ProductWordsMeaningCombined
- 1Winter down jacket1.000.920.96
- 2Lined parka0.840.970.91
- 3Wool winter jacket0.910.830.87
- 4Light winter jacket0.720.780.75
Keeps how good each match was. The parka is almost perfect on meaning and overtakes the wool jacket.
Only looks at the position in each list. How big the gap was is lost.
semanticRatio: setting the mix
The semanticRatio parameter runs from 0.0 (keyword search only) to 1.0 (vector search only), with 0.5 as the default. That lets you adjust the mix to the use case:
- Online shop (for example 0.3): Product names and specifications usually matter most. A low value matches the words the customer typed while still catching synonyms and typos.
- Support bot (for example 0.9): Users often ask vague questions, like "how do I fix the thingy?". A high value lets vector search work out what they mean instead of looking for the same words. We usually find the best value with A/B tests.
- 1XJ-900 headphones0.89
- 2XJ-950 Pro0.52
- 3XJ-800 headphones0.50
- 1Product page: Gadget 20.48
- 2XJ-900 user manual0.40
- 3Troubleshooting: the charger won’t charge0.33
Example data. Combined score = (1 − ratio) × keywords + ratio × meaning.
Use cases and commercial value
Here are three areas where search by meaning brings measurable gains: more sales, lower costs and happier customers.
Online shops: fewer searches with no results
Baymard Institute found in 2026 that 56% of large online shops have mediocre or worse search. 43% handle use-case searches poorly, such as "jacket for hiking" rather than just "jacket" (Baymard, 2026). Meanwhile, the people who search are the keenest to buy. In Constructor's data they were 24% of shoppers but 44% of revenue, and converted 2.5 times as well as everyone else (Constructor, 2024). Bear in mind that Constructor sells search software.
- Bookshop.org: The online bookstore moved from Elasticsearch to Meilisearch in 2023. The share of searches ending in a purchase rose from 14% to 20%, a 43% increase (Meilisearch, 2023). The gain came from switching search engine; semantic search wasn't part of the change.
- Etsy: Etsy introduced embedding-based search, where queries and products are described as vectors. Search purchase rate rose by 5.58% and site-wide conversion by 2.63% (Etsy, 2023).
RAG: AI that answers from your own data
With retrieval-augmented generation (RAG), a language model such as ChatGPT, Gemini or Claude searches the company's own data before it answers. The result is fewer made-up answers, and answers that cite their sources. We explain how a RAG system is built, step by step, in RAG explained.
- Morningstar: The financial services company launched "Mo" in 2023, an assistant for investors and advisers. Mo retrieves Morningstar's own research and ratings, passes them to the language model and checks the answer before it is shown (Morningstar, 2023).
- Klarna: Klarna's AI assistant, built on OpenAI and connected to Klarna's own data, handled 2.3 million conversations in its first month in 2024, two thirds of all customer service chats (Klarna, 2024). In May 2025, the CEO admitted the company had put too much weight on cost and that quality had dropped. Klarna then started hiring people for customer service again (CX Dive, 2025). The lesson is to measure quality as well as cost.
Recommendations for new products
Traditional recommendations ("customers who bought this also bought …") depend on history. They don't work well for new products, a problem known as cold start. Vector search solves it by looking at the product itself, such as its image, text and attributes, rather than at what users have done.
In Meilisearch, the /similar endpoint, added in version 1.9 in 2024, finds similar documents from their vectors (Meilisearch). An online shop can show "similar products" for an item added five minutes ago, without waiting for click data.
Technical implementation
1. Custom-built in Laravel and PHP
We work with Laravel a lot, and the integration there is straightforward. With Laravel Scout we control the search logic in code and can set up hybrid search the way you need it.
Example: hybrid search switched on
Hybrid search in Laravel is quick to set up, but you need a little more than the standard configuration to bring in the vector side. Here we weight keywords and meaning equally (0.5):
// ProductController.php - Example search with Laravel Scout$results = Product::search($userQuery, function ($meilisearch, $query, $options) { // Enable hybrid search with 50/50 balance $options['hybrid'] = [ 'semanticRatio' => 0.5, 'embedder' => 'default' ]; return $meilisearch->search($query, $options);})->paginate(20);How we switch on hybrid search with Laravel Scout and Meilisearch, with equal weight on keyword search and vector search.
2. WordPress and WooCommerce
For online shops on WooCommerce, the job is to get search out of the database. Standard WordPress search puts a heavy load on the database and often returns irrelevant results.
We run Meilisearch as a dedicated search engine next to the shop and talk to its API directly, so the database no longer handles search. You get faster search, spelling correction ("did you mean …?") and search by meaning, features that would otherwise need a much heavier platform.
3. As a separate service
In larger systems we often run Meilisearch as a separate service. A mobile app and a website can then use the same search engine. Meilisearch has a simple API, so the frontend can be built in Vue, React or Next.js while the backend handles the data.
Security: tenant tokens
Whatever the platform, data security matters, especially in SaaS products where customer A must never be able to search customer B's data.
Meilisearch handles this with tenant tokens. Instead of giving the frontend full access, the backend creates a signed, short-lived key with fixed rules, such as tenant_id = 1. Meilisearch then makes sure the search only covers that customer's data (Meilisearch).
Multimodal search: searching with images
The search field is no longer limited to text. Meilisearch added multimodal search in version 1.16 in August 2025, so text and images can be searched together (Meilisearch, 2025).
That solves a classic problem in e-commerce: how do you describe a style in words?
- The image: A user uploads a photo of a chair they like, but which is too expensive or the wrong colour.
- The vector: An AI model that understands images turns the visual style into a vector.
- The results: Meilisearch finds the products most similar in shape, style and look, whatever they are called.
That's useful in fashion, interiors and real estate, where the visual often matters more than the technical details.
Key takeaways
Semantic search understands what users mean, even when they misspell a word, use a synonym or write in another language. With tools like Meilisearch, businesses can offer search on a par with the large international players, at a fraction of the cost and complexity.
We combine years of experience in system architecture and web development with AI and search technology. We fit the tools to the platform you run today and build search that understands your customers.
Sources and further reading
- From trees to graphs: speeding up vector search 10x with Hannoy, Meilisearch 2025
- Hybrid search and ranking, Meilisearch documentation
- Ecommerce search UX: query types, Baymard Institute 2026
- Beyond Relevance, Constructor 2024
- Search abandonment impacts retail sales, Google Cloud 2021
- Unified embedding based personalized retrieval in Etsy search, Etsy 2023
- Bookshop.org increases search-based purchases, Meilisearch 2023


