gpt4 book ai didi

python - 使用切片扫描elasticsearch中的python助手

转载 作者:太空宇宙 更新时间:2023-11-03 14:04:45 24 4
gpt4 key购买 nike

我有以下代码:

client = Elasticsearch(hosts=['host'], port=9200)
scan_arguments = {'query': {'slice': {'max': 1, 'id': 0}}, 'preference': '_shards:0', 'index': u'my_index'}

for hit in scan(client, **scan_args):
# do something with hit

我收到以下错误

RequestError: TransportError(400, u'parsing_exception', u'[slice] failed to parse field [max]')

scan函数中slice参数应该如何传递?

最佳答案

根据我的经验,“max”需要 >1。我之前在使用 "max":1 时看到了同样的错误。

关于python - 使用切片扫描elasticsearch中的python助手,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48988359/

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