def content_deleted(content, event):
    if event.newParent is None:
        if changes.should_index_content(content):
            changes.unindex_content(content)
def content_modified(content, event):
    if changes.should_index_content(content):
        changes.index_content(content)
def content_added(content, event):
    if changes.should_index_content(content):
        changes.index_content(content)
def content_deleted(content, event):
    if event.newParent is None:
        if changes.should_index_content(content):
            changes.unindex_content(content)
def content_modified(content, event):
    if changes.should_index_content(content):
        changes.index_content(content)
def content_added(content, event):
    if changes.should_index_content(content):
        changes.index_content(content)