问题描述
我已经在我的应用程序上执行了elasticsearch / searchkick,它的开发工作。我的弹性搜索/ searchkick实现的资源是GoRails和我成功安装弹性搜索。但是当我把它推到Heroku时,它给了我错误:我做了英文日志,错误是:
请尝试这个................
Searchkick为Elasticsearch服务器使用ENV [ELASTICSEARCH_URL]。默认值为http:// localhost:9200。
Heroku
选择一个附加组件:SearchBox,Bonsai或Elastic Cloud。 p>
#SearchBox
heroku addons:create searchbox:starter
heroku config:set ELASTICSEARCH_URL =`heroku config:get SEARCHBOX_URL`
#盆景
heroku addons:create bonsai
heroku config:set ELASTICSEARCH_URL =`heroku config
#找到
heroku addons:create foundelasticsearch
/ pre>
heroku config:set ELASTICSEARCH_URL =`heroku config:get FOUNDELASTICSEARCH_URL`
然后部署和重新索引:
heroku run rake searchkick :reindex CLASS = Product
请参考这篇文档。
希望这将为您工作。谢谢!I've implemented elasticsearch/searchkick on my app and it works on development. My resources for the elasticsearch/searchkick implementation is GoRails and I installed elasticsearch successfully. But when I pushed it on Heroku, it gave me the error:
I did heroku logs and the errors are:
and
解决方案Please try this .................
Searchkick uses ENV["ELASTICSEARCH_URL"] for the Elasticsearch server. This defaults to http://localhost:9200. Heroku
Choose an add-on: SearchBox, Bonsai, or Elastic Cloud.
# SearchBox
heroku addons:create searchbox:starter heroku config:set ELASTICSEARCH_URL=`heroku config:get SEARCHBOX_URL`
# Bonsai
heroku addons:create bonsai heroku config:set ELASTICSEARCH_URL=`heroku config:get BONSAI_URL`
# Found
heroku addons:create foundelasticsearch heroku config:set ELASTICSEARCH_URL=`heroku config:get FOUNDELASTICSEARCH_URL`
Then deploy and reindex:
heroku run rake searchkick:reindex CLASS=Product
Please refer this documentation https://github.com/ankane/searchkick#deployment for more information.Hope this will work for you. Thanks!
这篇关于如何在Heroku上设置弹性搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!