问题描述
我正在运行 Rails 应用程序并尝试使用以下方法创建模型索引:
User.__elasticsearch__.create_index!
我收到此错误:
Elasticsearch::Transport::Transport::Errors::ServiceUnavailable: [503]
这是我的集群的健康状态:
{
"cluster_name" : "es-prod","status" : "green","timed_out" : false,"number_of_nodes" : 3,"number_of_data_nodes" : 3,"active_primary_shards" : 137,"active_shards" : 276,"relocating_shards" : 0,"initializing_shards" : 0,"unassigned_shards" : 0,"delayed_unassigned_shards" : 0,"number_of_pending_tasks" : 0,"number_of_in_flight_fetch" : 0,"task_max_waiting_in_queue_millis" : 0,"active_shards_percent_as_number" : 100.0
}
如果我试图直接在弹性搜索服务器上使用 CURL 命令创建索引,那么它工作正常,但我想使用 Rails 应用程序实现相同的目标。 任何帮助将不胜感激。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)