remove index

This commit is contained in:
邱博亞 2021-11-09 22:19:55 +08:00
parent 54f16a493e
commit dccbc0492b
1 changed files with 5 additions and 5 deletions

View File

@ -12,11 +12,11 @@ class SiteFeedAnnc
field :merge_with_category
field :remote_site_url
field :channel_title
I18n.available_locales.each do |locale|
index({ "all_contents_for_feed.#{locale}.is_hidden"=> -1,
"all_contents_for_feed.#{locale}.is_top"=> -1,
"all_contents_for_feed.#{locale}.postdate"=> -1}, { unique: false, background: true, name: "cache_#{locale}" })
end
#I18n.available_locales.each do |locale|
# index({ "all_contents_for_feed.#{locale}.is_hidden"=> -1,
# "all_contents_for_feed.#{locale}.is_top"=> -1,
# "all_contents_for_feed.#{locale}.postdate"=> -1}, { unique: false, background: true, name: "cache_#{locale}" })
#end
def get_annc(annc_uid)
Array(self[:all_contents_for_feed]).select{|v| v['id']==annc_uid}[0] rescue {}
end