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.

Weaviate collections can be created with multi-tenancy enabled, which partitions their data into isolated per-tenant shards. DBCode surfaces this structure directly in the connection tree.

Browsing tenants: A multi-tenant collection expands to show its tenants rather than opening data directly - the collection itself holds no rows without a tenant selected. Clicking a tenant opens that tenant’s objects in the data grid. Edits made in the grid apply only to the selected tenant.

Vector search and filters: Searches and metadata filters run scoped to the active tenant. The workflow is the same as for non-tenant collections - select a tenant, then query or filter as usual.

Tenant activity status: Each tenant displays its activity status alongside its name in the tree - ACTIVE, INACTIVE, or OFFLOADED. Inactive and offloaded tenants must be activated before their data can be browsed. DBCode will show an error if you attempt to open a tenant that is not active.

Managing tenants: Right-click a collection or tenant in the tree for lifecycle operations:

  • Collection context menu - Create Tenant: adds a new tenant to the collection.
  • Tenant context menu - Activate: brings an inactive or offloaded tenant online. Deactivate: unloads the tenant’s data from memory (data is preserved). Offload: moves the tenant’s data to cold storage (data is preserved but requires reactivation to access). Drop: permanently deletes the tenant and all its data.

For more information about Weaviate, check out Weaviate.