Skip to content

Node.js API Reference

The entry point for interacting with vector databases.

import { EmbexClient } from "@bridgerust/embex";
const client = new EmbexClient("qdrant", "http://localhost:6333");
  • provider: qdrant, chroma, weaviate, lancedb, pgvector, milvus
  • url: Connection string or URL.

Get a reference to a collection. Returns a Collection instance.

Represents a vector collection.

Create the collection.

Insert vectors. points is an array of Point objects.

// Point is a plain object interface, not a class
await col.insert([
{ id: "1", vector: [0.1, ...], metadata: { foo: "bar" } }
]);

Search for similar vectors. Returns an array of results.

Delete the collection.

async scroll(offset?: string, limit?: number)

Section titled “async scroll(offset?: string, limit?: number)”

Paginated export of points. Returns { points: Point[], nextOffset?: string }.

Utility for migrating data between providers.

import { DataMigrator } from "@bridgerust/embex";
const migrator = new DataMigrator(sourceClient, destClient);
// Migrate with auto-inferred schema
await migrator.migrateSimple("source_col", "dest_col");