Want more control over your search setup? Discover our flexible infrastructure pricing.

Go to homeMeilisearch's logo
Back to articles

What is vector search? Complete guide [2025]

Understand what vector search is, how it works, its benefits and limitations, how to start implementing it, and more.

17 Jul 202513 min read
Ilia Markov
Ilia MarkovSenior Growth Marketing Managernochainmarkov
What is vector search? Complete guide [2025]

Ever wanted to find the lyrics of a song but couldn't remember the exact words?

So you do the next best thing – you open up a search engine, type in the words as best you remember, and magically, the exact song you were looking for appears.

This is vector search working behind the scenes.

In recent years, vector search has seen growing adoption across various industries, from powering e-commerce engines that return the right product without requiring the exact product name to helping businesses evaluate the accuracy of their AI-powered chatbots.

In this article, we will discuss vector search and how it can be leveraged to quickly and accurately retrieve unstructured data.

By the end of this article, you will have learned:

  • What vectors and vector search embeddings are
  • The benefits and challenges that vector search poses
  • Applications of vector search embeddings
  • How vector search differs from other search technologies

Let’s get started.

Vector search is a method for defining and retrieving information that is most similar to a given query. Unlike traditional search engines, which look for exact matches, vector search transforms both the query and data to be retrieved into numerical vectors, then finds and returns the closest matches.

For instance, if you search using the keyword ‘world warm’ in a vector search engine, even though this does not make sense, you will get conceptually similar results on global warming, climate change, clean energy, and greenhouse gases. The search engine understands your intent, and even when your query is inaccurate, the results are exactly what you need.

Today, vector search finds applications in various industries, including multimedia, e-commerce, finance, healthcare, customer support, supply chain logistics, education, and more.

Let’s see how vector search works.

How does vector search work?

To understand how vector search works, we need to provide some context on vector embeddings. Vector embeddings are numerical representations of various data types (text, documents, images, or videos) that capture their semantic meaning.

How Vector Search Works.png

Here’s how vector search retrieves results.

  1. Stores vector embeddings: Before performing a search, all relevant items (texts, images, etc.) are converted into vector embeddings and stored in a vector database.
  2. Converts the search query to an embedding: When a user submits a query, it’s converted into a vector embedding using the same embedding model.
  3. Compares embeddings: The model then compares the query embedding with the stored embeddings to find the ones that are most similar.
  4. Returns results: The most similar items are ranked and returned to the user as the search results. Matches are returned based on how close the query’s embedding is to those in the database. This ensures matching based on meaning rather than word-for-word accuracy. Specifically, metrics such as cosine similarity and Euclidean distance are used to calculate the mathematical distance between embeddings, and embeddings with shorter distances are returned.

For example, the articles ‘How to Take Care of Your Cat’ and ‘A Beginner’s Guide to Raising a Kitten’ are stored as embeddings in a vector database. The mathematical distance between these embeddings is expected to be small because both articles discuss a similar animal. A search for ‘cat care’ will likely return both articles, even though one is about a cat and the other about a kitten.

We’ve just introduced a bunch of complex terms, though. Let’s now dive deeper to understand what each one means.

Vectors in the context of vector search are an array of numbers representing a piece of data. They help convert data from text, images, or even videos to numbers.

A graph showing how vectors in the context of vector search work?

Vectors are multidimensional. A vector can have hundreds of dimensions, each capturing the item's context based on a specific factor. For example, in the image above, the dimensions are topic, sentiment, and formality, among others.

Now, let’s discuss vector search embeddings.

What are vector search embeddings?

Vector embeddings are dense numerical representations of input data produced by machine learning models to enable effective search. These embeddings represent the data against which query embeddings are compared.

The process of creating a vector search embedding involves the following steps:

  1. Identify the type of data (text, image, etc.)
  2. Preprocess the data
  3. Apply the right embedding model
  4. Evaluate the embedding quality
  5. Optimize the results if needed

There are various machine learning models for converting data types to embeddings. Examples are Bidirectional Encoder Representations from Transformers (BERT), Global Vectors (GloVe), and Word2Vec.

Vector embeddings are widely used in image recognition, relevance ranking, customer intent understanding, and other applications.

Vector search helps in several ways. Let’s discuss some specific ones:

Benefits of Vector Search.png

1. Improved relevance in search results

Since vector search understands context and the meaning of queries, you get highly relevant results without much effort. A ‘clothes for winter’ vector search understands the context and returns results such as ‘gloves’, ‘trench coats’, and ‘jackets.’

2. Handles unstructured data

According to Forbes, approximately 80% of the world's data is unstructured, and 90% is likely to remain unanalyzed. With vector search, you can better represent and interpret unstructured data, not just tabular data.

For example, vector search enables the development of powerful image and video recognition models. A security camera can analyze live footage by extracting feature vectors from each frame and comparing them to stored vectors.

3. Multilingual understanding

You can use vector search to find results similar to a query, even though they are in different languages. The ‘BERT multilingual’ model allows vector embeddings across 104 languages.

In such a vector database, ‘school’ and ‘escuela’ would be close to each other because the Spanish word ‘escuela’ means ‘school.’

4. Personalized search experiences

Vector search can personalize search results and experiences by leveraging its capability to understand context. By converting search history into vectors, businesses can identify relevant results based on their users' personalized experiences.

For instance, if a music app user typically listens to slow ambient music, further searches favor slow-paced songs over fast-paced ones.

5. Scalable AI-powered features

Vector search supports AI-powered features like chatbots, recommendation engines, and virtual assistants.

An example is adding a company's public document to ChatGPT. The LLM transforms the document text into an embedding and can then accurately answer questions by matching the user query to the document embeddings.

Vector search is a game changer, but some challenges cannot be overlooked.

Challenges of Vector Search.png

1. Computational cost and performance

Vector search, which involves a large number of multidimensional vectors, requires substantial computational resources in terms of vector indexing, storage, and inference. A vector can have up to 1,536 dimensions, and performing a vector search can mean comparing millions of vectors.

Additionally, vector search employs algorithms such as approximate nearest neighbors (ANNs), which require substantial memory and computation resources. Attempting to optimize this process with indexing, such as Hierarchical Navigable Small World (HNSW) indexing, is also computationally intensive.

2. Complexity of implementation

Implementing vector search involves a steep learning curve. You must master a barrage of concepts, such as machine learning models, embedding techniques, and vector databases.

3. Quality of embeddings

Poor embeddings equal poor results, period. Choosing the right model for embeddings is one of the most important things when building a vector search engine.

Additionally, vector search does not stop at embeddings; the database's indexing must also be precise. Otherwise, the search results become unreliable.

4. Interpretability and debugging

Since vector search is based on meaning and context, explaining and interpreting some of the results might be hard. This creates a ‘black box’ system, where it is difficult to see precisely why a particular result was returned.

When the results are incorrect, diagnosing the issue can be difficult. It might stem from a poorly chosen embedding model, suboptimal indexing, an inefficient similarity metric, or improper optimization. Many possible reasons make debugging a complex task.

5. Data privacy and security

If the vectors in vector search are not handled correctly, sensitive data could leak. Since embeddings are derived directly from the original data, an attacker with access to the embedding model or vector index could perform a reconstruction attack to recover sensitive information.

Additionally, similarity leaks between vectors can expose relationships that reveal user behavior patterns or private associations, posing a serious privacy risk.

The use case of vector search spans multiple industries, including search engines and recommendation systems.

Here are some of its most common applications:

  • E-commerce: You can apply vector search to make accurate product recommendations. Because of its ability to conduct similarity and multi-modal search, vector search can provide similar products to what you are looking for.
  • Healthcare: Radiologists can use vector search in medical imaging to identify conditions such as pneumonia or tumors. This use case uses a vector model known as a convolutional neural network (CNN) to convert chest X-rays into vectors, enabling the extrapolation of similar patterns in tumors.
  • AI-powered customer support (chatbots): Vector search can deliver advanced interactions in natural language. Many AI chatbots combine vector search with language models to provide accurate and meaningful responses.
  • Image-based search: Vector search is used in facial recognition software and in recommending visual content on social media.
  • Voice assistant queries: Vector search has transformed voice assistant capabilities by enabling contextual interactions. A good example is in smart home control devices. These devices use vector search to understand nuances in commands. For example, the command ‘make the house warm’ is converted to a vector, allowing the device to adjust the indoor temperature.
  • Document classification and retrieval: Vector embeddings can capture the theme of a document, making it easy to classify and retrieve.
  • Hybrid search: Vector search can be combined with other search techniques, such as keyword search, to further enhance the search results.
  • Sentiment analysis for customer feedback: You can use vector search to gain a meaningful understanding of your customers' opinions and feedback and determine whether it is overall positive or negative.

Interesting so far! Now, let’s see how companies use vector search in their products.

What are some vector search examples?

Here are some examples of vector search that we might be using every day:

  • Google Search: Uses vector models such as the Bidirectional Encoder Representations from Transformers (BERT) model to interpret search queries.
  • Netflix: Understands your viewing habits, compares them to those of similar viewers, and then recommends movies or shows you might enjoy.
  • Spotify: Recommends music based on your listening history using audio embeddings.
  • Facebook: Recommends friends to connect with based on your profile information.
  • Pinterest: Utilizes image embeddings, enabling users to discover similar images. For example, if you search ‘decorated garden,’ Pinterest returns layouts of decorated gardens.

Let’s see how to implement vector search in your project.

With everything we’ve said about vector search, it’s clear that implementing it into your project can be a challenge. However, it doesn’t have to be if you use the right tools, such as Meilisearch.

Meilisearch is an open-source platform that can be seamlessly integrated with a wide range of software products. It also offers excellent documentation and a comprehensive user guide.

Let’s examine a step-by-step process for implementing vector search using Meilisearch:

1. Run a Meilisearch server

The first step is to self-host Meilisearch. To do that, download the Meilisearch binary from the official documentation.

Run it locally with a simple command ./meilisearch. Meilisearch is accessible at http://127.0.0.1:7700.

Alternatively, you can run the Meilisearch server using Docker with the command:

# Using Docker (recommended)
docker run -d -p 7700:7700 getmeili/meilisearch:v1.6
# Or using Homebrew
brew install meilisearch
meilisearch

2. Set up a Meilisearch MCP server

Vector search is performed using the Meilisearch MCP server. If you haven't already, install the Meilisearch MCP server using Claude Desktop.

# Using pip
pip install meilisearch-mcp
# Or using uvx (recommended)
uvx -n meilisearch-mcp

Configure Claude Desktop to connect to the Meilisearch server. In the claude_desktop_config.json file, include the following:

{
  "mcpServers": {
    "meilisearch": {
      "command": "uvx",
      "args": ["-n", "meilisearch-mcp"]
    }
  }
}

Vector search is an experimental feature, so we must explicitly enable it in Meilisearch. In the Claude Desktop, enter:

# Enable the vector search experimental feature on Meilisearch
enable-vector-search

4. Configure the vector embedder

Generate embeddings for your data using an external embedding model. We can use models such as OpenAI, Ollama, and Hugging Face.

Alternatively, we can have Meilisearch generate the vector for us. For example, to use an OpenAI embedder model that converts all text in an index into a searchable 1,536-dimensional vector, enter the command in the MCP server, i.e., Claude Desktop:

# Example: Configure OpenAI embedder
update-embedders '{
  "indexUid": "my-index",
  "embedders": {
    "openai-embedder": {
      "source": "openAi",
      "model": "text-embedding-3-small",
      "dimensions": 1536
    }
  }
}

5. Transform data into vectors

The next step involves transforming your documents into searchable vectors through the vector embedder.

Use the add-documents to add a document and its vectors. In this case, the id, title, and content contain the document, while vectors are the embedding from OpenAI. The document is saved in the index, my-index.

# Add documents with vector embeddings to Meilisearch
add-documents '{
  "indexUid": "my-index",
  "documents": [
    {
      "id": "1",
      "title": "Vector search guide",
      "content": "This is about vector search...",
      "_vectors": {
        "openai-embedder": [0.123, 0.456, 0.789]
      }
    }
  ]
}

To have Meilisearch generate the embedding automatically, simply skip the _vectors key in the document.

# Add documents with vector embeddings to Meilisearch
add-documents '{
  "indexUid": "my-index",
  "documents": [
    {
      "id": "1",
      "title": "Vector search guide",
      "content": "This is about vector search..."
    }
  ]
}

With the document now represented as embeddings, you can now enter a search query into your vector search. The system processes the search query, calculates the vector similarity, matches the semantic results, and then ranks the results based on similarity scores.

For instance, the command below searches for the vector in my-index.

# Perform a vector search on the index using Meilisearch CLI
search '{
  "indexUid": "my-index",
  "vector": [0.123, 0.456, 0.789, …],
  "limit": 10
}'

The result will return the top 10 most similar documents, ranked by their vector similarity scores.

Now that we understand how vector search with Meilisearch works, how does vector search compare with keyword search?

How does vector search differ from other models?

Search engines come in many forms – keyword, contextual, semantic, and hybrid – each with a unique approach and strengths. Let’s explore how vector search compares to each of them.

While vector search finds results based on vector embeddings, keyword search finds results based on the exact keyword match.

The key differences between vector and keyword search are shown below.

Vector search vs keyword search.png

These are similar yet distinct. Vector search focuses on the meaning, while semantic search focuses on understanding the intent behind the words. The key difference is that semantic search uses NLP instead of vector embeddings. Semantic search is also referred to as AI-powered search.

The key differences between vector and semantic search are shown below.

Vector search vs semantic search.png

Vector search and contextual search are also closely related and sometimes used interchangeably. But there are still some differences between them.

Vector search uses semantic similarity between vector embeddings, whereas contextual search focuses on factors such as query history, user intent, and location.

The key differences between vector and contextual search are shown below.

Vector search vs contextual search.png

Hybrid search combines both keyword search and semantic search. Hybrid search can also include vector search.

The key differences between vector and hybrid search are shown in the table below.

Vector search vs hybrid search.png

Now, what does the future hold for vector search?

Final thoughts on vector search in 2025

Suppose you are a software engineer, a data scientist, or a developer, and you still struggle with the limitations of the traditional keyword search. In that case, you should consider vector search as a viable solution.

Why Meilisearch makes vector search more accessible

Meilisearch is a fast, open-source search engine with vector search capabilities, making it a practical and accessible tool for developers who want to integrate semantic search without complex infrastructure.

Semantic search vs Vector search: Key differences, uses, & more

Semantic search vs Vector search: Key differences, uses, & more

Discover the key differences between semantic and vector search, their use cases, strengths, and how to choose the right approach for your search needs.

Ilia Markov
Ilia Markov30 Jul 2025
Elasticsearch vs Typesense (vs Meilisearch): Which search engine actually fits your needs in 2025?

Elasticsearch vs Typesense (vs Meilisearch): Which search engine actually fits your needs in 2025?

Compare Elasticsearch's enterprise-scale power, Typesense's developer-friendly speed, and Meilisearch's AI-powered simplicity to find the search engine that matches your needs, team capabilities, and growth trajectory.

Ilia Markov
Ilia Markov29 Jul 2025
Most personalized search experiences are a lie

Most personalized search experiences are a lie

Learn what true search personalization looks like – and how to implement it without bloated, ineffective solutions.