Esempio n. 1
0
 def handle(self, *args, **options):
     if settings.FEATURE_FLAGS.get('SEARCH_BUILD_INDEX', False):
         self.stdout.write('elastic indexing')
         delete = options['delete']
         if delete:
             SignalDocument.clear_index()
         SignalDocument.index_documents()
     else:
         self.stdout.write('elastic indexing disabled')
     self.stdout.write('done!')
Esempio n. 2
0
 def _clear_index(self):
     self.stdout.write('* Clear the index')
     if not self._dry_run:
         SignalDocument.clear_index()
         self._init_index()