Added missing metadata fields to upserted documents (parent, routing, ttl, timestamp, version and versionType)

Closes #3444