Whatever message this page gives is out now! Go check it out!

ingest

Last update:
May 18, 2026
Embeds text segments and stores them in the specified vector store. This is the final step of a standalone document processing pipeline built with DocumentService().

Syntax

docService.ingest( segments, vectorStoreClient [, options] )

Parameters

Parameter
Type
Required
Description
segments
Array
Required
Array of text segment Structs to embed and store, as returned by split() or transformSegments().
vectorStoreClient
VectorStore
Required
A VectorStore() instance to receive the embedded segments.
options
Struct
Optional
Keys: batchSize (Numeric, default 100, range 1–1000) — number of segments embedded per batch; continueOnError (Boolean, default true) — when true, skips failed segments and continues processing.

Returns

Returns a Struct with the following keys:
Key
Description
totalSegments
Total segments passed in.
successfulSegments
Segments successfully embedded and stored.
failedSegments
Segments that could not be embedded or stored.
durationMs
Total ingestion time in milliseconds.
status
String status of the operation.

Example

result = docService.ingest(segments, vectorStore, { batchSize: 50 });
writeOutput("Success: #result.successfulSegments# / #result.totalSegments#");

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page