def pre_load_hook(self):
     if not self.in_place and self.own_index_exists:
         # delete the existing index.
         self.log("Deleting index")
         self.indexing_pillow.get_es_new().indices.delete(self.indexing_pillow.es_index)
         self.log("Recreating index")
         create_index_for_pillow(self.indexing_pillow)
         initialize_mapping_if_necessary(self.indexing_pillow)
Esempio n. 2
0
 def _prepare_index_for_reindex(self):
     if not self.es.indices.exists(self.index_info.index):
         self.es.indices.create(index=self.index_info.index, body=self.index_info.meta)
     initialize_mapping_if_necessary(self.es, self.index_info)
     set_index_reindex_settings(self.es, self.index_info.index)
Esempio n. 3
0
def _prepare_index_for_reindex(es, index_info):
    if not es.indices.exists(index_info.index):
        es.indices.create(index=index_info.index, body=index_info.meta)
    initialize_mapping_if_necessary(es, index_info)
    set_index_reindex_settings(es, index_info.index)
Esempio n. 4
0
def _prepare_index_for_reindex(es, index_info):
    if not es.indices.exists(index_info.index):
        es.indices.create(index=index_info.index, body=index_info.meta)
    initialize_mapping_if_necessary(es, index_info)
    set_index_reindex_settings(es, index_info.index)