perf: mongo index;fix: loading status and abort chat, system prompt empty
This commit is contained in:
@@ -43,4 +43,11 @@ const BillSchema = new Schema({
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
BillSchema.index({ time: -1 });
|
||||
BillSchema.index({ userId: 1 });
|
||||
} catch (error) {
|
||||
error;
|
||||
}
|
||||
|
||||
export const Bill: Model<BillType> = models['bill'] || model('bill', BillSchema);
|
||||
|
||||
@@ -82,4 +82,11 @@ const ModelSchema = new Schema({
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
ModelSchema.index({ updateTime: -1 });
|
||||
ModelSchema.index({ 'share.collection': -1 });
|
||||
} catch (error) {
|
||||
error;
|
||||
}
|
||||
|
||||
export const Model: MongoModel<ModelType> = models['model'] || model('model', ModelSchema);
|
||||
|
||||
Reference in New Issue
Block a user