diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index 52474e1..2cd924c 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -123,6 +123,9 @@ class Bulletin index({postdate: 1}, { unique: false, background: true }) index({is_top: -1,postdate: -1, _id: -1}, { unique: false, background: true }) index({approved: -1,is_hidden: 1,is_preview: 1, is_top: -1,postdate: -1,_id: -1,deadline: -1}, { unique: false, background: true }) + index({approved: -1,is_hidden: 1,is_preview: 1,category_id: 1,"title.zh_tw": 1,postdate: -1,deadline: 1}, {background: true,name: "idx_slow_query_zh_tw" }) + index({approved: -1,is_hidden: 1,is_preview: 1,category_id: 1,"title.zh_cn": 1,postdate: -1,deadline: 1}, {background: true,name: "idx_slow_query_zh_cn" }) + index({approved: -1,is_hidden: 1,is_preview: 1,category_id: 1,"title.en": 1,postdate: -1,deadline: 1}, {background: true,name: "idx_slow_query_en" }) if AnnouncementSetting.pluck(:enable_manually_sort).first == true index({approved: -1,is_hidden: 1,is_preview: 1, is_top: -1,sort_number: 1,postdate: -1,_id: -1,deadline: -1}, { unique: false, background: true }) end