无法使用 django-rest 和 elasticsearch 索引值

failing to index values using django-rest and elasticsearch

我的数据库是 postgreSQL,我正在使用 django_elasticsearch_dsl 连接 django 和 elasticsearch。

出于某种原因,当我 运行 命令时:

python manage.py search_index --rebuild

我收到这条错误消息:

NewConnectionError(<urllib3.connection.HTTPConnection object at 0x058AEE38>: Failed to establish a new connection: [WinError 10061] No connection could be made because the 
target machine actively refused it)

这是我第一次使用 elasticsearch,所以我真的不知道为什么会收到错误。

有人知道如何解决吗?

问题出在 elasticsearch 的安装上,我只需要在我的电脑上重新安装它