From d100c3fc5fa32f74cc4e9550a2fd62303f09b6b9 Mon Sep 17 00:00:00 2001 From: Yanlong Wang Date: Tue, 14 May 2024 19:57:49 +0800 Subject: [PATCH] fix: search result cache save --- backend/functions/src/cloud-functions/searcher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/functions/src/cloud-functions/searcher.ts b/backend/functions/src/cloud-functions/searcher.ts index 33fc52f..8356d06 100644 --- a/backend/functions/src/cloud-functions/searcher.ts +++ b/backend/functions/src/cloud-functions/searcher.ts @@ -380,7 +380,7 @@ ${this.content} createdAt: nowDate, expireAt: new Date(nowDate.valueOf() + this.cacheRetentionMs) }); - SearchResult.save(record).catch((err) => { + SearchResult.save(record.degradeForFireStore()).catch((err) => { this.logger.warn(`Failed to cache search result`, { err }); });