Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 def _run(self):
   es = elasticsearch.Elasticsearch(self.es_host)
   elasticsearch_requests.load_mapping(es,
                                       self.index_name,
                                       'maude',
                                       './schemas/maude_mapping.json')
Пример #4
0
 def _run(self):
   es = elasticsearch.Elasticsearch(self.es_host)
   elasticsearch_requests.load_mapping(
     es, 'drugevent.base', 'safetyreport', './schemas/faers_mapping.json')
Пример #5
0
 def _run(self):
     es = elasticsearch.Elasticsearch(self.es_host)
     elasticsearch_requests.load_mapping(es, 'recall.base',
                                         'enforcementreport',
                                         './schemas/res_mapping.json')
Пример #6
0
 def _run(self):
   es = elasticsearch.Elasticsearch(self.es_host)
   elasticsearch_requests.load_mapping(
     es, 'recall.base', 'enforcementreport', './schemas/res_mapping.json')
Пример #7
0
 def _run(self):
   es = elasticsearch.Elasticsearch(self.es_host)
   elasticsearch_requests.load_mapping(
     es, 'druglabel.base', 'spl', './schemas/spl_mapping.json')
Пример #8
0
 def _run(self):
     es = elasticsearch.Elasticsearch(self.es_host)
     elasticsearch_requests.load_mapping(es, 'drugevent.base',
                                         'safetyreport',
                                         './schemas/faers_mapping.json')