gpt4 book ai didi

ruby-on-rails - Elasticsearch::Transport::Transport::Errors::NotFound ([404] {"error": {"root_cause":[ {"type":"index_not_found_exception"

转载 作者:行者123 更新时间:2023-12-02 22:15:54 26 4
gpt4 key购买 nike

在本地环境中工作时不确定 elasticsearch我收到这个奇怪的错误,任何帮助我都会很感激。谢谢

Elasticsearch::Transport::Transport::Errors::NotFound ([404] {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"invoices","index":"invoices"}],"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"invoices","index":"invoices"},"status":404})

最佳答案

通过在 rails console 运行这些命令来索引 ES 修复了问题:-

Model.__elasticsearch__.create_index!
Model.__elasticsearch__.create_index! force: true
Model.import force: true

关于ruby-on-rails - Elasticsearch::Transport::Transport::Errors::NotFound ([404] {"error": {"root_cause":[ {"type":"index_not_found_exception",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49810704/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com