ReindexOptions
Defined in: packages/memory-ltm/src/types.ts:119
Properties
Section titled “Properties”batchSize?
Section titled “batchSize?”
optionalbatchSize?:number
Defined in: packages/memory-ltm/src/types.ts:123
Number of memories to load per page. Defaults to 100.
cursor?
Section titled “cursor?”
optionalcursor?:string
Defined in: packages/memory-ltm/src/types.ts:134
Resume from a previously returned cursor. Pair with batchSize to process
large datasets across multiple invocations.
maxMemories?
Section titled “maxMemories?”
optionalmaxMemories?:number
Defined in: packages/memory-ltm/src/types.ts:136
Stop after processing at most this many memories.
onProgress?
Section titled “onProgress?”
optionalonProgress?: (progress) =>void
Defined in: packages/memory-ltm/src/types.ts:147
Invoked after each batch with cumulative progress.
Parameters
Section titled “Parameters”progress
Section titled “progress”Returns
Section titled “Returns”void
recreate?
Section titled “recreate?”
optionalrecreate?:boolean
Defined in: packages/memory-ltm/src/types.ts:145
When true, drop and rebuild the entire vector index before reindexing, so
the backfill is clean and leaves no orphaned points. Only honoured for an
unscoped full reindex (no userId, cursor, or maxMemories); ignored
otherwise. The rebuild is destructive and NOT atomic: recall is empty for
all tenants until it completes, and a mid-run failure leaves the index
empty (safe to re-run — embeddings are reused from Postgres).
reuseExistingEmbeddings?
Section titled “reuseExistingEmbeddings?”
optionalreuseExistingEmbeddings?:boolean
Defined in: packages/memory-ltm/src/types.ts:129
When true (default), memories that already have an embedding are reused and only mirrored into the vector store. When false, embeddings are regenerated for every memory (useful after an embedding-model change).
userId?
Section titled “userId?”
optionaluserId?:string
Defined in: packages/memory-ltm/src/types.ts:121
Restrict the reindex to a single user. Omit to reindex every user.