code: def clear(self):
          
          logger.info("Resetting indexes")
          state = self.app_state
  
          for _name, idx in state.indexes.items():
              writer = AsyncWriter(idx)
              writer.commit(merge=True, optimize=True, mergetype=CLEAR)
  
          state.indexes.clear()
          state.indexed_classes.clear()
          state.indexed_fqcn.clear()
          self.clear_update_queue()
  
          if self.running:
              self.stop()
docs: Remove all content from indexes, and unregister all classes.
  
          After clear() the service is stopped. It must be started again
          to create new indexes and register classes.