We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d2b1e7c + e62690b commit 6bc511bCopy full SHA for 6bc511b
functions/src/backfill.js
@@ -90,7 +90,7 @@ module.exports = onDocumentWritten("typesense_sync/backfill", async (snapshot, c
90
91
lastDoc = thisBatch.docs.at(-1) ?? null;
92
try {
93
- await typesense.collections(encodeURIComponent(config.typesenseCollectionName)).documents().import(currentDocumentsBatch, {action: "upsert"});
+ await typesense.collections(encodeURIComponent(config.typesenseCollectionName)).documents().import(currentDocumentsBatch, {action: "upsert", return_id: true});
94
info(`Imported ${currentDocumentsBatch.length} documents into Typesense`);
95
} catch (err) {
96
error(`Import error in a batch of documents from ${currentDocumentsBatch[0].id} to ${lastDoc.id}`, err);
0 commit comments