mirror of
https://github.com/labring/FastGPT.git
synced 2026-01-29 01:15:28 +08:00
index
This commit is contained in:
@@ -107,6 +107,16 @@ try {
|
||||
|
||||
// Cron clear invalid data
|
||||
DatasetDataSchema.index({ updateTime: 1 });
|
||||
|
||||
// fileId index
|
||||
DatasetDataSchema.index(
|
||||
{ fileId: 1 },
|
||||
{ unique: true, partialFilterExpression: { fileId: { $exists: true } } }
|
||||
);
|
||||
DatasetDataSchema.index(
|
||||
{ imageId: 1 },
|
||||
{ unique: true, partialFilterExpression: { imageId: { $exists: true } } }
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user