feat: operation index (#5056)

* feat: operation index

* fix: delete update vector

* perf: Clear invalid data

* perf: index

* perf: cleare invalid data

* index
This commit is contained in:
Archer
2025-06-18 00:46:31 +08:00
committed by GitHub
parent 6060543222
commit 6b2ea696c5
8 changed files with 84 additions and 31 deletions

View File

@@ -23,6 +23,12 @@ try {
ImageSchema.index({ type: 1 });
// delete related img
ImageSchema.index({ teamId: 1, 'metadata.relatedId': 1 });
// Cron clear invalid img
ImageSchema.index(
{ createTime: 1 },
{ partialFilterExpression: { 'metadata.relatedId': { $exists: true } } }
);
} catch (error) {
console.log(error);
}