timetable-extension #1
@ -157,34 +157,34 @@ func CreateTimetableIndexes() error {
|
||||
coll := MongoClient.Database(DatabaseName).Collection(TimetableCollection)
|
||||
indexModels := []mongo.IndexModel{
|
||||
{
|
||||
Keys: bson.M{
|
||||
"trainUid": 1,
|
||||
"stpIndicator": 1,
|
||||
"scheduleStartDate": 1,
|
||||
Keys: bson.D{
|
||||
{Key: "trainUid", Value: 1},
|
||||
{Key: "stpIndicator", Value: 1},
|
||||
{Key: "scheduleStartDate", Value: 1},
|
||||
},
|
||||
Options: options.Index().SetName("delete_query"),
|
||||
},
|
||||
{
|
||||
Keys: bson.M{
|
||||
"trainUid": 1,
|
||||
"scheduleStartDate": 1,
|
||||
"scheduleEndDate": 1,
|
||||
"daysRun": 1,
|
||||
Keys: bson.D{
|
||||
{Key: "trainUid", Value: 1},
|
||||
{Key: "scheduleStartDate", Value: 1},
|
||||
{Key: "scheduleEndDate", Value: 1},
|
||||
{Key: "daysRun", Value: 1},
|
||||
},
|
||||
Options: options.Index().SetName("find_by_uid"),
|
||||
},
|
||||
{
|
||||
Keys: bson.M{
|
||||
"headcode": 1,
|
||||
"scheduleStartDate": 1,
|
||||
"scheduleEndDate": 1,
|
||||
"daysRun": 1,
|
||||
Keys: bson.D{
|
||||
{Key: "headcode", Value: 1},
|
||||
{Key: "scheduleStartDate", Value: 1},
|
||||
{Key: "scheduleEndDate", Value: 1},
|
||||
{Key: "daysRun", Value: 1},
|
||||
},
|
||||
Options: options.Index().SetName("find_by_headcode"),
|
||||
},
|
||||
{
|
||||
Keys: bson.M{
|
||||
"serviceDetail.vstp": 1,
|
||||
Keys: bson.D{
|
||||
{Key: "serviceDetail.vstp", Value: 1},
|
||||
},
|
||||
Options: options.Index().SetName("vstp"),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user