Esempio n. 1
0
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)
Esempio n. 2
0
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)
Esempio n. 3
0
def delete_document(document, deleted_at=None):
    index_delete(document.id)
    document.delete(deleted_at=deleted_at)
Esempio n. 4
0
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)