Rails:运行我的种子文件和elasticsearch抛出:多个索引

Rails:运行我的种子文件和elasticsearch抛出:多个索引,
Warning: implode(): Invalid arguments passed in /data/phpspider/zhask/webroot/tpl/detail.html on line 45
,,所以我运行的是一个很大而且相当复杂的种子文件。在批量保存之前,我批量创建所有类型的关联记录。我遇到了一个问题,我遇到了以下错误: Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root_cause": [{"type":"illegal_argument_exception","reason":"Alias [clients_development] has more than one in

所以我运行的是一个很大而且相当复杂的种子文件。在批量保存之前,我批量创建所有类型的关联记录。我遇到了一个问题,我遇到了以下错误:

Elasticsearch::Transport::Transport::Errors::BadRequest: [400] 
{"error":{"root_cause":
[{"type":"illegal_argument_exception","reason":"Alias 
[clients_development] has more than one indices associated with it 
[[clients_development_20170106095823597, 
clients_development_20161123102035835]], can't execute a single index 
op"}],"type":"illegal_argument_exception","reason":"Alias 
[clients_development] has more than one indices associated with it 
[[clients_development_20170106095823597, 
clients_development_20161123102035835]], can't execute a single index 
op"},"status":400}
/Users/
看起来我的数据库有问题?也许是测试/开发数据库?我已经运行了很多rake命令,但它们都是这个坏孩子:

rake db:drop && rake db:create && rake db:migrate && rake db:schema:dump && rake db:test:prepare

在这个过程中,我遇到了同样的错误。有人知道发生了什么吗?

您可以尝试确保Elasticsearch不会在多个位置运行。之后,尝试重新索引所有记录:

rake searchkick:reindex:all

格雷西亚斯!就这样。