Commit 5df802e16002f7eb33b7f94ca33a9f59aff972ab

Authored by Andrew Kane
1 parent 72dc6c5a

Added support for OPENSEARCH_URL [skip ci]

Showing 2 changed files with 5 additions and 1 deletions   Show diff stats
  1 +## 4.5.3 (unreleased)
  2 +
  3 +- Added support for `OPENSEARCH_URL`
  4 +
1 ## 4.5.2 (2021-08-05) 5 ## 4.5.2 (2021-08-05)
2 6
3 - Fixed error with reindex queue 7 - Fixed error with reindex queue
lib/searchkick.rb
@@ -56,7 +56,7 @@ module Searchkick @@ -56,7 +56,7 @@ module Searchkick
56 require "typhoeus/adapters/faraday" if defined?(Typhoeus) && Gem::Version.new(Faraday::VERSION) < Gem::Version.new("0.14.0") 56 require "typhoeus/adapters/faraday" if defined?(Typhoeus) && Gem::Version.new(Faraday::VERSION) < Gem::Version.new("0.14.0")
57 57
58 Elasticsearch::Client.new({ 58 Elasticsearch::Client.new({
59 - url: ENV["ELASTICSEARCH_URL"], 59 + url: ENV["ELASTICSEARCH_URL"] || ENV["OPENSEARCH_URL"],
60 transport_options: {request: {timeout: timeout}, headers: {content_type: "application/json"}}, 60 transport_options: {request: {timeout: timeout}, headers: {content_type: "application/json"}},
61 retry_on_failure: 2 61 retry_on_failure: 2
62 }.deep_merge(client_options)) do |f| 62 }.deep_merge(client_options)) do |f|