@task
def unindex_documents(ids, index_pk):
 cls = WikiDocumentType
 es = cls.get_connection('indexing')
 index = Index.objects.get(pk=index_pk)
 cls.bulk_delete(ids, es=es, index=index.prefixed_name)

@ task def unindex_documents ( ids , index_pk ) : cls = WikiDocumentType es = cls . get_connection ( 'indexing' ) index = Index . objects . get ( pk = index_pk ) cls . bulk_delete ( ids , es = es , index = index . prefixed_name )
delete a list of documents from the provided index .