Skip to main content
Add single or multiple documents to the vector database.

add()

Add a single document.

Signature

Parameters

Example

Errors


addMany()

Add multiple documents in a batch.

Signature

Parameters

Example

Errors

Validation

addMany performs these validations before processing:
  • No duplicate IDs within the batch
  • No IDs that already exist in the database
  • All texts are non-empty
  • All texts are within maxDocumentSize
  • Batch size doesn’t exceed maxBatchSize
  • All metadata.id values match document IDs

Performance

  • addMany is significantly faster than calling add in a loop due to batch embedding generation.
  • Embeddings are generated at ~100-200 documents/second.
  • Use appropriate maxBatchSize to avoid memory spikes.

search()

Query documents

update()

Update documents

remove()

Remove documents