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()
评论列表
文章目录