@@ -0,0 +1,10 @@
from elasticsearch import Elasticsearch
# 连接本地的 Elasticsearch 实例
es = Elasticsearch(["http://localhost:9200"])
# 检查连接是否成功
if es.ping():
print("连接成功!")
else:
print("连接失败!")
The note is not visible to the blocked user.