Searchkick with ElasticSearch returns “Faraday::ConnectionFailed: execution expired”

前端 未结 3 932
粉色の甜心
粉色の甜心 2021-01-21 03:36

I\'ve been using the searchkick gem with elasticsearch with no problems on a Rails 4.2.0 application. I have a single Video model using searchkick.

For some reason

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-21 03:54

    Add below lines of code in config/initializers/elasticsearch.rb

    Searchkick.client = Elasticsearch::Client.new(hosts: ["localhost:9200"], retry_on_failure: true, transport_options: {request: {timeout: 250}})

    You can specify this according to Rails environment.

提交回复
热议问题