File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,8 +88,7 @@ def self.client
8888 if client_type == :opensearch
8989 OpenSearch ::Client . new ( {
9090 url : ENV [ "OPENSEARCH_URL" ] ,
91- # TODO remove headers in Searchkick 6
92- transport_options : { request : { timeout : timeout } , headers : { content_type : "application/json" } } ,
91+ transport_options : { request : { timeout : timeout } } ,
9392 retry_on_failure : 2
9493 } . deep_merge ( client_options ) ) do |f |
9594 f . use Searchkick ::Middleware
@@ -98,15 +97,9 @@ def self.client
9897 else
9998 raise Error , "The `elasticsearch` gem must be 7+" if Elasticsearch ::VERSION . to_i < 7
10099
101- transport_options = { request : { timeout : timeout } }
102- # TODO remove headers in Searchkick 6
103- if Elasticsearch ::VERSION . to_i < 9
104- transport_options [ :headers ] = { content_type : "application/json" }
105- end
106-
107100 Elasticsearch ::Client . new ( {
108101 url : ENV [ "ELASTICSEARCH_URL" ] ,
109- transport_options : transport_options ,
102+ transport_options : { request : { timeout : timeout } } ,
110103 retry_on_failure : 2
111104 } . deep_merge ( client_options ) ) do |f |
112105 f . use Searchkick ::Middleware
You can’t perform that action at this time.
0 commit comments