add some indices to increase performance

This commit is contained in:
Sven Czarnian
2022-10-23 14:58:04 +02:00
parent 0535873da0
commit ad843e4706
3 changed files with 5 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ export type AirportDocument = Airport & Document;
export class Airport { export class Airport {
@Prop({ @Prop({
required: true, required: true,
index: true,
type: String, type: String,
}) })
icao: string; icao: string;

View File

@@ -7,12 +7,14 @@ export type LogEntryDocument = LogEntry & Document;
export class LogEntry { export class LogEntry {
@Prop({ @Prop({
required: true, required: true,
index: true,
type: String, type: String,
}) })
component: string; component: string;
@Prop({ @Prop({
required: true, required: true,
index: true,
enum: ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'], enum: ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'],
type: String, type: String,
}) })

View File

@@ -10,8 +10,9 @@ export type PerformanceDocument = Performance & Document;
@Schema() @Schema()
export class Performance { export class Performance {
@Prop({ @Prop({
type: String,
required: true, required: true,
index: true,
type: String,
}) })
icaoCode: string; icaoCode: string;