Skip to main content

Collection Methods

count

Gets the total number of records in the collection

add

Adds new records to the collection.
string[]
required
Embeddings
Metadata[]
string[]
string[]

get

Retrieves records from the collection based on filters.
string[]
Where
number
number
WhereDocument
Include[]
Returns: Promise resolving to matching records

peek

Retrieves a preview of records from the collection.
number
Returns: Promise resolving to a sample of records

query

Performs similarity search on the collection.
Embeddings
string[]
string[]
string[]
number
Where
WhereDocument
Include[]
Returns: Promise resolving to similar records ranked by distance

modify

Modifies collection properties like name, metadata, or configuration.
string
CollectionMetadata
UpdateCollectionConfiguration

update

Updates existing records in the collection.
string[]
required
Embeddings
Metadata[]
string[]
string[]

upsert

Inserts new records or updates existing ones (upsert operation).
string[]
required
Embeddings
Metadata[]
string[]
string[]

delete

Deletes records from the collection based on filters.
string[]
Where
WhereDocument
Performs hybrid search on the collection using expression builders.
SearchLike | SearchLike[]
required
Single search payload or array of payloads
ReadLevel
Returns: Promise resolving to column-major search results

Types

GetResult

Result class for get operations, containing retrieved records. Properties
(string | null)[]
Embeddings
string[]
Include[]
(TMeta | null)[]
(string | null)[]

QueryResult

Result class for query operations, containing search results. Properties
(number | null)[][]
(string | null)[][]
(Embedding | null)[][]
string[][]
Include[]
(TMeta | null)[][]
(string | null)[][]