about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorTakeshi Umeda <noel.yoshiba@gmail.com>2021-11-19 06:02:08 +0900
committerGitHub <noreply@github.com>2021-11-18 22:02:08 +0100
commit3419d3ec84c3aa4f450265642e0a85dcdd3c36d0 (patch)
treedfd530fcfaed29a5421138087ef3a240d3c45a3c /config/initializers
parent2b6a25c609e2d1814e5dd586e9f40868d944c8bc (diff)
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
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/chewy.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/config/initializers/chewy.rb b/config/initializers/chewy.rb
index 820182a21..fbbcbbcde 100644
--- a/config/initializers/chewy.rb
+++ b/config/initializers/chewy.rb
@@ -37,23 +37,3 @@ end
 # Mastodon is run with hidden services enabled, because
 # ElasticSearch is *not* supposed to be accessed through a proxy
 Faraday.ignore_env_proxy = true
-
-# Elasticsearch 7.x workaround
-Elasticsearch::Transport::Client.prepend Module.new {
-  def search(arguments = {})
-    arguments[:rest_total_hits_as_int] = true
-    super arguments
-  end
-}
-
-Elasticsearch::API::Indices::IndicesClient.prepend Module.new {
-  def create(arguments = {})
-    arguments[:include_type_name] = true
-    super arguments
-  end
-
-  def put_mapping(arguments = {})
-    arguments[:include_type_name] = true
-    super arguments
-  end
-}