mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
index
This commit is contained in:
parent
48132422b9
commit
6270901b08
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue