def __init__(self, docman):
# Parent object
self.docman = docman
# Action buffer for bulk indexing
self.action_buffer = []
# Docs to update
# Dict stores all documents for which firstly
# source has to be retrieved from Elasticsearch
# and then apply_update needs to be performed
# Format: [ (doc, update_spec, action_buffer_index, get_from_ES) ]
self.doc_to_update = []
# Below dictionary contains ids of documents
# which need to be retrieved from Elasticsearch
# It prevents from getting same document multiple times from ES
# Format: {"_index": {"_type": {"_id": True}}}
self.doc_to_get = {}
# Dictionary of sources
# Format: {"_index": {"_type": {"_id": {"_source": actual_source}}}}
self.sources = {}
elastic_doc_manager.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录