adding processed state in document advance search