From dccbc0492b1eaf5c764b110106f961fb160f4816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Tue, 9 Nov 2021 22:19:55 +0800 Subject: [PATCH] remove index --- app/models/site_feed_annc.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/site_feed_annc.rb b/app/models/site_feed_annc.rb index dd5d4a5..392b112 100644 --- a/app/models/site_feed_annc.rb +++ b/app/models/site_feed_annc.rb @@ -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