replaced id for doc_id in embedded documents