Weaviate for Beginners: A Vector Database That Understands Meaning
Pinecone is a managed service, but sometimes you want a vector database you can run yourself and shape to your data. Weaviate is an open-source vector database that stores your objects together with their vectors, so you
Pinecone is a managed service, but sometimes you want a vector database you can run yourself and shape to your data. Weaviate is an open-source vector database that stores your objects together with their vectors, so you can search by meaning and filter by properties in a single query.
You start by defining a collection with a schema:
await client.collections.create({
name: "Article",
properties: [
{ name: "title", dataType: "text" },
{ name: "topic", dataType: "text" },
],
});
Then you insert objects, and Weaviate generates vectors for the text fields automatically if you connect an embedding model. Querying combines semantic search with filters:
const result = await collection.query.nearText("how to save money", {
limit: 5,
filters: collection.filter.byProperty("topic").equal("finance"),
});
That combination β "similar in meaning, and about finance" β is the query most real apps actually need, and doing it in one place is Weaviate's strength. It also supports hybrid search, which blends keyword matching with vector search, and it can generate answers from the results it finds.
Weaviate is for you if you want a self-hosted or cloud vector database with a real schema, filters, and hybrid search, and if you like open-source tools you can inspect. It has a free sandbox in its cloud and a Docker image for local development.
But know its limits. Running a database yourself means you operate it: backups, upgrades, and scaling are your job. The GraphQL-style API and the concepts of collections, modules, and vectorizers take a day to learn. And like any vector database, it is only as good as the embeddings you feed it.
Start today: run Weaviate locally with Docker, create one collection, insert ten short objects, and run a near-text query. Then add a filter and compare the results.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.