timetable-extension #1

Open
fred.boniface wants to merge 144 commits from timetable-extension into main
1 changed files with 16 additions and 16 deletions
Showing only changes of commit 652d900618 - Show all commits

View File

@ -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"),
},