Rails:运行 我的种子文件和 elasticsearch 抛出:多个索引
Rails: running my seeds file and elasticsearch throws: more than one indices
所以我正在 运行 宁一个大而相当复杂的种子文件。在批量保存它们之前,我批量创建所有类型的关联记录。我正在 运行 遇到一个问题,我遇到了这个错误:
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/
我好像遇到了数据库问题? Test/dev 分贝,也许吧?我已经 运行 执行了很多 rake 命令,但它们总计是这个坏男孩:
rake db:drop && rake db:create && rake db:migrate && rake db:schema:dump && rake db:test:prepare
我运行在这个过程中遇到了同样的错误。有人知道发生了什么事吗?
您可以尝试确保没有在多个地方使用 Elasticsearch 运行。之后,尝试重新索引所有记录:
rake searchkick:reindex:all
所以我正在 运行 宁一个大而相当复杂的种子文件。在批量保存它们之前,我批量创建所有类型的关联记录。我正在 运行 遇到一个问题,我遇到了这个错误:
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/
我好像遇到了数据库问题? Test/dev 分贝,也许吧?我已经 运行 执行了很多 rake 命令,但它们总计是这个坏男孩:
rake db:drop && rake db:create && rake db:migrate && rake db:schema:dump && rake db:test:prepare
我运行在这个过程中遇到了同样的错误。有人知道发生了什么事吗?
您可以尝试确保没有在多个地方使用 Elasticsearch 运行。之后,尝试重新索引所有记录:
rake searchkick:reindex:all