For a long time, e-commerce search engines worked on a simple principle: compare the words in the query with the words in product titles and descriptions. This approach - called "lexical" or "keyword" search - is effective for exact queries, but it quickly reaches its limits given the reality of online shoppers' behavior.

Vector search, also called semantic search, represents a fundamental technological shift in how search engines understand queries. It is now at the core of the most advanced search engines, including Google Search and Google Vertex AI Search for Retail.

What is vector search?

A vector is, in mathematics, an ordered list of numbers. In natural language processing (NLP), researchers discovered that it was possible to represent the meaning of a word, sentence, or entire text as a vector with hundreds or thousands of dimensions.

These representations - called embeddings - are built by deep learning models trained on massive text corpora. The fundamental property of embeddings: two texts with similar meanings end up mathematically close in vector space, even if they share no words.

The classic embeddings example

In a well-trained vector space, "running shoe" and "athletic trainer" are close. "Rain jacket" and "waterproof coat" are close. "Office outfit" is close to "formal shirt" and "blazer". The distance between vectors reflects semantic proximity.

In the e-commerce context, each product in your catalog is indexed as an embedding. Each visitor query is also converted into an embedding in real time. The engine then calculates the distance between the query vector and all catalog vectors, and returns the closest products - the most semantically relevant ones.

Lexical search vs. vector search

To understand the contribution of vector search, here is a direct comparison of both approaches on common e-commerce scenarios:

Query Lexical search (BM25) Vector search
"office outfit summer" Zero results if these 3 words don't appear in product pages ✓ Finds mid-season dresses, light blouses, blazers...
"gift for baby" Only products tagged "baby" + "gift" ✓ Understands intent, suggests newborn sets, developmental toys, strollers...
"comfortable shoes long walks" Looks for "comfortable" and "long walks" in descriptions ✓ Understands the need, finds hiking shoes, ergonomic soles...
"nkie air max" (typo) Zero results (exact match) ✓ Corrects and understands the query

Lexical search excels when the query exactly matches catalog terms (SKU, brand, product name). Vector search excels for natural language queries, vague purchase intents, and need descriptions.

Concrete benefits for an e-commerce site

Drastic reduction in zero-result queries

"No results" pages are one of the main abandonment causes on e-commerce sites. Vector search allows always showing relevant products, even for unusual queries or natural language searches.

Natural language understanding

Your visitors don't think in catalog keywords. They describe their needs: "something warm for winter", "unique wedding gift", "bike to commute to work". Vector search understands these formulations and responds to them.

Better catalog coverage

With lexical search, products with poorly written or sparse product pages are invisible. Vector search understands the product as a whole and can find it even with imperfect product pages.

Test vector search on your catalog

Vectail integrates Google Vertex AI Search for Retail - the same technology as Google Search - into your store in 2 minutes. 14-day free trial, no credit card required.

Start for free

Hybrid search: the best of both worlds

Pure vector search has a limitation: it is less precise than lexical search for exact queries. A visitor who types "Nike Air Max 90 white size 10" expects an exact match - not a semantic interpretation.

That's why modern search engines combine both approaches in what is called hybrid search:

  • Vector search - for natural language queries, intents, need descriptions
  • Lexical search (BM25) - for exact references, brands, model numbers
  • Result fusion - scores from both approaches are combined (often via a technique called Reciprocal Rank Fusion) to produce a final ranking

Google Vertex AI Search for Retail uses this hybrid approach natively. It's one of the reasons its results are relevant across a wide spectrum of queries - from the most precise to the most vague.

How does vector indexing work?

When your catalog is synchronized, each product is processed as follows:

  1. Text extraction - title, description, categories, product attributes
  2. Embedding generation - the language model converts this text into an N-dimensional vector
  3. Storage in a vector index - vectors are stored in a structure enabling fast similarity search (ANN - Approximate Nearest Neighbors)
  4. Continuous updates - each catalog modification updates the corresponding embeddings

During a query, the same pipeline applies to the visitor's query: the text is converted into an embedding, and ANN search finds the N closest vectors in the index in a few milliseconds.

Implementation complexity: building and maintaining an in-house vector search infrastructure is a significant project - embedding model selection, ANN infrastructure to deploy, catalog update pipeline to maintain, and relevance to calibrate. Turnkey solutions like Vertex AI Search for Retail (via Vectail) delegate this complexity to Google.

Vector search vs. traditional solutions

Several e-commerce search solutions present themselves as "semantic" or "AI" without necessarily using true vector embeddings. The differences show up in edge cases: natural language queries, need descriptions, or queries in a different language from the catalog.

Signs of true vector search:

  • Relevant results for queries never seen in the catalog
  • Synonym understanding without manual configuration
  • Ability to respond to natural language queries
  • Multilingual relevance (a query in one language can find products in another if catalogs are properly encoded)

Google's vector search in your store in 2 minutes

Vectail connects your catalog to Google Vertex AI Search for Retail via a simple script tag. No development, no infrastructure to maintain. 14-day free trial.

Start for free