this would take the first doc ID, because most of time there would be a single document, but in case of nested documents, I think we should take the last one?