我将我的应用程序部署到heroku,为elasticsearch添加 bonsai
插件,然后使用url创建config var ELASTICSEARCH_URL
.
我想要索引的类是 Product
.
我跑:
heroku run rake searchkick:reindex CLASS=Product
它工作正常 . 但是当我打开应用程序时出现错误,我读了日志,这就是我得到的:
Searchkick :: InvalidQueryError([400] {“error”:{“root_cause”:[{“type”:“search_parse_exception”,“reason”:“找不到[created_at]的映射以排序”}], “type”:“search_phase_execution_exception”,“reason”:“所有分片失败”,“阶段”:“query_fetch”,“分组”:true,“failed_shards”:[{“shard”:0,“index”:“products_production_20170105030153240 “,”reason“:{”type“:”search_parse_exception“,”reason“:”找不到[created_at]的映射,以便排序“}}]},”status“:400}):
有任何想法吗?
1 回答
问题是我在heroku中没有任何产品 . 我创造了一个产品,然后我跑了
现在我开始工作了