I currently have an index in Elasticsearch 5.5 that has several different document types in it. One of the documents is a complex POCO object that I'm indexing to Elasticsearch using dynamic mapping (no mapping set up in advance). The other document types in the same index do have mapping. I've needed to add the routing required flag to the index, which is fine for the documents that have mapping I just use:
.Mappings(m => m
.Map<DocType>(mDocType => mDocType.Properties(DocType.AddAllMappings).RoutingField(routing => routing.Required()))
Is there anyway of me adding the RoutingField required setting to the document that is being dynamically mapped? I'd rather not have to set up all the mapping, child elements etc. for this document because as I mentioned it's a complex object.