【发布时间】:2021-11-05 22:32:05
【问题描述】:
我通过以下方式连接到弹性搜索客户端:
es = Elasticsearch(
hosts = myip,
port = myport,
http_auth = (myname, mycode),
connection_class = RequestsHttpConnection,
scheme = 'https',
use_ssl = True,
verify_certs = False,
)
现在我想开始进行这样的查询:
es.search(index="sw", body={"query": {"prefix" : { "name" : "Mary" }}})
但问题是我不知道弹性字段的名称。我怎样才能从弹性或更好的打印数据,打印标题的名称?
【问题讨论】:
标签: python elasticsearch python-3.8 elk