Bump chewy from 5.2.0 to 7.2.3 (supports Elasticsearch 7.x) (#16915)
* Bump chewy from 5.2.0 to 7.2.2 * fix style (codeclimate) * fix style * fix style * Bump chewy from 7.2.2 to 7.2.3
This commit is contained in:
parent
2b6a25c609
commit
3419d3ec84
15 changed files with 136 additions and 145 deletions
|
@ -143,7 +143,7 @@ class Account < ApplicationRecord
|
|||
|
||||
delegate :chosen_languages, to: :user, prefix: false, allow_nil: true
|
||||
|
||||
update_index('accounts#account', :self)
|
||||
update_index('accounts', :self)
|
||||
|
||||
def local?
|
||||
domain.nil?
|
||||
|
|
|
@ -19,5 +19,5 @@ class AccountStat < ApplicationRecord
|
|||
|
||||
belongs_to :account, inverse_of: :account_stat
|
||||
|
||||
update_index('accounts#account', :account)
|
||||
update_index('accounts', :account)
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
class Bookmark < ApplicationRecord
|
||||
include Paginable
|
||||
|
||||
update_index('statuses#status', :status) if Chewy.enabled?
|
||||
update_index('statuses', :status) if Chewy.enabled?
|
||||
|
||||
belongs_to :account, inverse_of: :bookmarks
|
||||
belongs_to :status, inverse_of: :bookmarks
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
class Favourite < ApplicationRecord
|
||||
include Paginable
|
||||
|
||||
update_index('statuses#status', :status)
|
||||
update_index('statuses', :status)
|
||||
|
||||
belongs_to :account, inverse_of: :favourites
|
||||
belongs_to :status, inverse_of: :favourites
|
||||
|
|
|
@ -42,7 +42,7 @@ class Status < ApplicationRecord
|
|||
# will be based on current time instead of `created_at`
|
||||
attr_accessor :override_timestamps
|
||||
|
||||
update_index('statuses#status', :proper)
|
||||
update_index('statuses', :proper)
|
||||
|
||||
enum visibility: [:public, :unlisted, :private, :direct, :limited], _suffix: :visibility
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class Tag < ApplicationRecord
|
|||
scope :recently_used, ->(account) { joins(:statuses).where(statuses: { id: account.statuses.select(:id).limit(1000) }).group(:id).order(Arel.sql('count(*) desc')) }
|
||||
scope :matches_name, ->(term) { where(arel_table[:name].lower.matches(arel_table.lower("#{sanitize_sql_like(Tag.normalize(term))}%"), nil, true)) } # Search with case-sensitive to use B-tree index
|
||||
|
||||
update_index('tags#tag', :self)
|
||||
update_index('tags', :self)
|
||||
|
||||
def to_param
|
||||
name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue