index_builder.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:pic-data 作者: NYPL 项目源码 文件源码
def create_indices(endpoint):
    """
    Creates constituent and address indices in PIC
    """
    connections.connections.create_connection(hosts=[endpoint], timeout=360, max_retries=10, retry_on_timeout=True)
    pic_index = Index('pic')
    pic_index.doc_type(Constituent)
    pic_index.doc_type(Address)
    pic_index.delete(ignore=404)

    pic_index.settings(
        number_of_shards=5,
        number_of_replicas=2
    )
    pic_index.create()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号