def delete_search_units(source_units, languages):
 index = get_source_index()
 writer = index.writer()
 try:
  for pk in source_units:
   writer.delete_by_term('pk', pk)
 finally:
  writer.commit()
 for (lang, units) in languages.items():
  index = get_target_index(lang)
  writer = index.writer()
  try:
   for pk in units:
    writer.delete_by_term('pk', pk)
  finally:
   writer.commit()

def delete_search_units ( source_units , languages ) : index = get_source_index ( ) writer = index . writer ( ) try : for pk in source_units : writer . delete_by_term ( 'pk' , pk ) finally : writer . commit ( ) for ( lang , units ) in languages . items ( ) : index = get_target_index ( lang ) writer = index . writer ( ) try : for pk in units : writer . delete_by_term ( 'pk' , pk ) finally : writer . commit ( )
delete fulltext index for given set of units .