def _run(self): logging.info('Create index and loading mapping: %s/%s', self.target_index_name, self.target_type_name) es = elasticsearch.Elasticsearch(self.target_host, timeout=120) if self.delete_index: elasticsearch_requests.clear_and_load(es, self.target_index_name, self.target_type_name, self.target_mapping_file) else: elasticsearch_requests.load_mapping(es, self.target_index_name, self.target_type_name, self.target_mapping_file)
def _run(self): logging.info('Create index and loading mapping: %s/%s', self.target_index_name, self.target_type_name) es = elasticsearch.Elasticsearch(self.target_host) if self.delete_index: elasticsearch_requests.clear_and_load(es, self.target_index_name, self.target_type_name, self.target_mapping_file) else: elasticsearch_requests.load_mapping(es, self.target_index_name, self.target_type_name, self.target_mapping_file)