def es_migration(self, hosts,
                     project_name,
                     indexes=None,
                     query=None,
                     scroll="5m",
                     logstore_index_mappings=None,
                     pool_size=10,
                     time_reference=None,
                     source=None,
                     topic=None,
                     wait_time_in_secs=60,
                     auto_creation=True):
        """
        migrate data from elasticsearch to aliyun log service

        :type hosts: string
        :param hosts: a comma-separated list of source ES nodes. e.g. "localhost:9200,other_host:9200"

        :type project_name: string
        :param project_name: specify the project_name of your log services. e.g. "your_project"

        :type indexes: string
        :param indexes: a comma-separated list of source index names. e.g. "index1,index2"

        :type query: string
        :param query: used to filter docs, so that you can specify the docs you want to migrate. e.g. '{"query": {"match": {"title": "python"}}}'

        :type scroll: string
        :param scroll: specify how long a consistent view of the index should be maintained for scrolled search. e.g. "5m"

        :type logstore_index_mappings: string
        :param logstore_index_mappings: specify the mappings of log service logstore and ES index. e.g. '{"logstore1": "my_index*", "logstore2": "index1,index2"}, "logstore3": "index3"}'

        :type pool_size: int
        :param pool_size: specify the size of process pool. e.g. 10

        :type time_reference: string
        :param time_reference: specify what ES doc's field to use as log's time field. e.g. "field1"

        :type source: string
        :param source: specify the value of log's source field. e.g. "your_source"

        :type topic: string
        :param topic: specify the value of log's topic field. e.g. "your_topic"

        :type wait_time_in_secs: int
        :param wait_time_in_secs: specify the waiting time between initialize aliyun log and executing data migration task. e.g. 60

        :type auto_creation: bool
        :param auto_creation: specify whether to let the tool create logstore and index automatically for you. e.g. True

        :return: MigrationResponse

        :raise: Exception
        """
        from .es_migration import MigrationManager
        from .es_migration import MigrationResponse

        migration_manager = MigrationManager(hosts=hosts,
                                             indexes=indexes,
                                             query=query,
                                             scroll=scroll,
                                             endpoint=self._endpoint,
                                             project_name=project_name,
                                             access_key_id=self._accessKeyId,
                                             access_key=self._accessKey,
                                             logstore_index_mappings=logstore_index_mappings,
                                             pool_size=pool_size,
                                             time_reference=time_reference,
                                             source=source,
                                             topic=topic,
                                             wait_time_in_secs=wait_time_in_secs,
                                             auto_creation=auto_creation)
        res = migration_manager.migrate()
        resp = MigrationResponse()
        resp.body = res
        return resp
migrate data from elasticsearch to aliyun log service

        :type hosts: string
        :param hosts: a comma-separated list of source ES nodes. e.g. "localhost:9200,other_host:9200"

        :type project_name: string
        :param project_name: specify the project_name of your log services. e.g. "your_project"

        :type indexes: string
        :param indexes: a comma-separated list of source index names. e.g. "index1,index2"

        :type query: string
        :param query: used to filter docs, so that you can specify the docs you want to migrate. e.g. '{"query": {"match": {"title": "python"}}}'

        :type scroll: string
        :param scroll: specify how long a consistent view of the index should be maintained for scrolled search. e.g. "5m"

        :type logstore_index_mappings: string
        :param logstore_index_mappings: specify the mappings of log service logstore and ES index. e.g. '{"logstore1": "my_index*", "logstore2": "index1,index2"}, "logstore3": "index3"}'

        :type pool_size: int
        :param pool_size: specify the size of process pool. e.g. 10

        :type time_reference: string
        :param time_reference: specify what ES doc's field to use as log's time field. e.g. "field1"

        :type source: string
        :param source: specify the value of log's source field. e.g. "your_source"

        :type topic: string
        :param topic: specify the value of log's topic field. e.g. "your_topic"

        :type wait_time_in_secs: int
        :param wait_time_in_secs: specify the waiting time between initialize aliyun log and executing data migration task. e.g. 60

        :type auto_creation: bool
        :param auto_creation: specify whether to let the tool create logstore and index automatically for you. e.g. True

        :return: MigrationResponse

        :raise: Exception