0

我正在尝试来自馆长的基本代码

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

1 回答 1

2

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

于 2016-05-13T21:16:19.647 回答