rebuild_search_index.py 文件源码

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

项目:elasticsearch-django 作者: yunojuno 项目源码 文件源码
def do_index_command(self, index, **options):
        """Rebuild search index."""
        if options['interactive']:
            logger.warning("This will permanently delete the index '%s'.", index)
            if not self._confirm_action():
                logger.warning("Aborting rebuild of index '%s' at user's request.", index)
                return

        try:
            delete = delete_index(index)
        except TransportError:
            delete = {}
            logger.info("Index %s does not exist, cannot be deleted.", index)
        create = create_index(index)
        update = update_index(index)

        return {
            'delete': delete,
            'create': create,
            'update': update
        }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号