def clean_search_unit(pk, lang):
 if appsettings.OFFLOAD_INDEXING:
  add_index_update(pk, False, True, lang)
 else:
  delete_search_unit(pk, lang)

def clean_search_unit ( pk , lang ) : if appsettings . OFFLOAD_INDEXING : add_index_update ( pk , False , True , lang ) else : delete_search_unit ( pk , lang )
cleanups search index on unit deletion .