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

@@ -132,6 +132,12 @@ try {
}
}
);
// Clear invalid image
DatasetCollectionSchema.index({
teamId: 1,
'metadata.relatedImgId': 1
});
} catch (error) {
console.log(error);
}

View File

@@ -103,12 +103,14 @@ try {
});
// Recall vectors after data matching
DatasetDataSchema.index({ teamId: 1, datasetId: 1, collectionId: 1, 'indexes.dataId': 1 });
DatasetDataSchema.index({ updateTime: 1 });
// rebuild data
DatasetDataSchema.index({ rebuilding: 1, teamId: 1, datasetId: 1 });
// 为查询 initJieba 字段不存在的数据添加索引
DatasetDataSchema.index({ initJieba: 1, updateTime: 1 });
// Cron clear invalid data
DatasetDataSchema.index({ updateTime: 1 });
} catch (error) {
console.log(error);
}