code: def _pre_delete_hook(cls, key):
          
          if cls.searching_enabled:
              doc_id = cls.search_get_document_id(key)
              index = cls.search_get_index()
              index.delete(doc_id)
docs: Removes instance from index.