How do I map a single .NET type to multiple nested object types in ElasticSearch/NEST?
I'm using the NEST library to interact with ElasticSearch, and I'm trying to figure out a way to build index types/nested objects based on non-type data. The type has the following basic structure. public class Entity : DynamicObject { public string Id { get; set; } // a bunch of other simple properties public override IEnumerable<string> GetDynamicMemberNames() { return Data.Select(x => x.Name); } public override bool TryGetMember(GetMemberBinder binder, out object result) { var dictionary = Data.First(x => x.Name == binder.Name); result = dictionary; return true; } // each instance of one