def reindex_entity(entity, references=True): log.info('Index [%s]: %s', entity.id, entity.name) if entity.state != Entity.STATE_ACTIVE: index_delete(entity.id) if references: delete_entity_references(entity.id) else: index_entity(entity)
def delete_document(document, deleted_at=None): with graph.transaction() as tx: graph.remove_document(tx, document.id) index_delete(document.id) document.delete(deleted_at=deleted_at)
def delete_document(document, deleted_at=None): index_delete(document.id) document.delete(deleted_at=deleted_at)