Skip to content

Weaviate Vector Database Management in VS Code

Weaviate is an open-source, schema-strict vector database designed for AI-native applications. Highlights include:

  • Hybrid search: Combine vector similarity (nearVector, nearText) with keyword BM25 search in a single query
  • Server-managed vectorizers: Attach a text2vec-* module (e.g. text2vec-openai, text2vec-cohere) to a class and Weaviate generates embeddings at write time - no client-side embedding required
  • Declared class schema: Each class (collection) has a defined property schema; objects must conform to it
  • gRPC + REST: Fast binary transport over gRPC (port 50051) with a REST management API (port 8080)
  • Cloud or self-hosted: Run locally with Docker, on-prem, or via Weaviate Cloud (WCD)

Weaviate is commonly used for semantic search, retrieval-augmented generation (RAG), recommendation systems, and any workload that benefits from combining structured filters with high-dimensional vector similarity.

To connect to Weaviate in DBCode:

  1. Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
  2. Add a New Connection: Click on the “Add Connection” icon.
  3. Complete the connection form: Select Weaviate as the database type and enter:
    • Host address (REST default port: 8080; gRPC default port: 50051)
    • API key (for Weaviate Cloud or any auth-protected instance)
    • Optional SSL/TLS configuration
    • Optional SSH tunnel
  4. Connect: Click save to connect to your Weaviate instance.
  5. Start exploring: Browse your collections, inspect objects, and run vector searches.

For detailed instructions, refer to the Connect article.

DBCode brings the same browse-and-search workflow you already use for SQL and document databases to Weaviate:

  • Collection browsing: Navigate Weaviate classes (collections), see object counts, and inspect the declared property schema
  • Vector cell rendering: Vector columns are summarised inline and expandable on click
  • Vector search: Run nearest-neighbour searches with nearVector, returning results with a _distance column; combine with metadata filters for precision
  • Text search: Use nearText or hybrid queries to search by meaning and keyword simultaneously - leveraging the server-managed vectorizer configured on each class
  • Object editing: Edit object properties inline via the data grid; the object UUID and vectors are read-only
  • Monitoring panels: View cluster node status and per-collection object counts at a glance
  • JS shell editor: Drop into a JavaScript editor and run the official Weaviate client v3 SDK directly:
    // Nearest-neighbour vector search
    collection('Article').query.nearVector([...], { limit: 10, returnMetadata: ['distance'] });
    // Fetch objects with filters
    collection('Article').query.fetchObjects({ limit: 20 });
    // Text search
    collection('Article').query.nearText(['query term'], { limit: 5 });
    // Hybrid search (vector + keyword)
    collection('Article').query.hybrid('search terms', { limit: 10 });

By using Weaviate with DBCode, you get a unified workspace for traditional and vector data without leaving VS Code.

For more information about Weaviate, check out Weaviate.