AI-powered hybrid search is in closed beta. Join the waitlist for early access!

Go to homeMeilisearch's logo
Back to articles
15 Feb 2024

What is a vector database?

Vector databases are specialized systems to store, manage, and query data in the form of vector embeddings. They are optimized for similarity search, which involves finding the most similar items to a given query vector.

Carolina Ferreira
Carolina FerreiraDeveloper Advocate @ Meilisearch@CarolainFG
What is a vector database?

Understanding vector databases

Vector databases are the go-to for performing searches based on similarity, which plays a key role in AI-driven applications like recommending your next favorite movie, identifying someone in a photo, or digging up texts that resonate with your search. At the core of these applications are vector embeddings, complex data forms that exceed the storage and retrieval capabilities of traditional databases. 

The role of vector embeddings

[Vector embeddings](/blog/what-are-vector-embeddings/?utm_source=blog&utm_medium=vector-db-content&utm_campaign=vector-search are a way to transform complex non-numeric data, such as words, sentences, or even images, into a numerical format while preserving their semantic meaning and relationships. 

Embeddings are multidimensional objects generated by machine learning models where each dimension represents a different feature or aspect of the data. To properly capture the data complexity, vectors can range from dozens to thousands of dimensions, depending on the size and nature of the data. 

Vector databases vs traditional databases

This complexity makes traditional databases–designed to store structured data in tables– unfit to handle embeddings. The volume and complexity of these vectors, each potentially containing thousands of dimensions, challenge the row-and-column format. This mismatch necessitates alternative storage and retrieval solutions tailored to the requirements of vector data.

This is where vector databases like Meilisearch come into play. They are designed to address the unique demands of vector embeddings, facilitating efficient storage and retrieval of the information they contain. In particular, they enable performing similarity searches, also called semantic searches, which are central to leveraging embeddings effectively. 

Learn more about how Meilisearch built Arroy in Rust an open-source vector store.

In other words, vector databases allow us to interact easily and efficiently with vector embeddings, making them essential for applications that require semantic understanding and similarity matching.

What is similarity search?

If we think of vector embeddings as stars in vast cosmic constellations, similarity search, or vector search, would be like trying to find the nearest stars to your current position in space. In practical terms, this means finding the most relevant documents, images, or products based on your search query.

To do so, you need to measure the distance between the query vector and other vectors in the database, typically using methods like cosine similarity or Euclidean distance. These are just different techniques for determining how close or distant other data points are from your query, much like gauging the proximity of stars in the night sky. 

The role of machine learning models

However, the success of this search isn't just about mathematical calculations; it's highly dependent on the machine learning model used to generate and query the vectors. Each vector's meaning is intrinsically tied to the semantic space of the model that created it. Consistency here is crucial, ensuring that all vectors 'speak the same language' and adhere to the same contextual rules, making searches meaningful and accurate. That is to say, to achieve relevant search results, it's essential to use the same model for generating and querying the embeddings.

Similarity search is where vector databases like Meilisearch truly shine, as they allow for a wide array of applications such as face recognition, movie recommendations, and personalized content discovery. By allowing users to store vector embeddings alongside their documents, Meilisearch not only facilitates similarity searches but also introduces hybrid search capabilities, expanding its potential applications. Through the integration of models from various AI solution providers, Meilisearch enables users to refine vector embeddings to better suit their specific needs.

In summary, the ability of these databases to analyze and compare complex data patterns allows for highly relevant and accurate results across diverse fields, enhancing user experiences and operational efficiency.

AI Search is coming to Meilisearch Cloud, join the waitlist:

Join now


Meilisearch is an open-source search engine that not only provides state-of-the-art experiences for end users but also a simple and intuitive developer experience. 

A long-time actor in keyword search, Meilisearch enables users to address search use cases building upon AI-powered solutions, not only supporting vector search as a vector store but also by providing hybrid search. This hybrid approach blends full-text search with semantic search, enhancing both the accuracy and comprehensiveness of search results.

For more things Meilisearch, you can join the community on Discord or subscribe to the newsletter. You can learn more about the product by checking out the roadmap and participating in product discussions.

Searching across multiple languages

Searching across multiple languages

Discover how easy it can be to implement advanced multilingual search and give your users the seamless, relevant results they deserve—regardless of language.

Quentin de Quelen
Quentin de Quelen26 Sept 2024
What is federated search?

What is federated search?

Learn what federated search is and the use cases it unlocks.

Laurent Cazanove
Laurent Cazanove06 Sept 2024
Choosing the best model for semantic search

Choosing the best model for semantic search

A comparison of model performance, cost, and relevancy in regard to building semantic search.

Quentin de Quelen
Quentin de Quelen03 Sept 2024