0

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

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

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

4

1 回答 1

1

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

rake searchkick:reindex:all
于 2017-01-24T19:47:21.933 回答