gpt4 book ai didi

Elasticsearch : Curator does not work

转载 作者:行者123 更新时间:2023-12-03 01:01:08 25 4
gpt4 key购买 nike

我正在尝试来自策展人的基本代码

http://curator.readthedocs.io/en/4.0/examples.html

我尝试

import elasticsearch
import curator
if __name__ == '__main__':
client = elasticsearch.Elasticsearch([{'host': "http://localhost", 'port':9200}])

ilo = curator.IndexList(client)
ilo.filter_by_regex(kind='prefix', value='logstash-')
print ilo

但我明白了
ilo = curator.IndexList(client)
AttributeError: 'module' object has no attribute 'IndexList'

我错过了什么?

最佳答案

我猜你的策展人版本不是 4.0。检查您正在使用的版本的文档。例如对于 3.5.1:http://curator.readthedocs.io/en/v3.5.1/

关于 Elasticsearch : Curator does not work,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37219194/

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