尝试按照以下步骤映射对象:
client.MapFluent<MyType>(m=>m .MapFromAttributes() .NestedObject<MyItem>(no=>no .Name(p=>p.MyItems.First()) .Dynamic() .Enabled() .IncludeInAll() .IncludeInParent() .IncludeInRoot() .MapFromAttributes() .Path("full") .Properties(pprops => pprops .String(ps => ps .Name(p => p.FirstName) .Index(FieldIndexOption.not_analyzed) ) //etcetera ) ));的
client.MapFromAttributes()功能非常有限,很可能会在1.0版本中删除。注释属性名称非常好,但是很快就无法表达。mapfluent调用中的MapFromAttributes()仍然是一种将int键入为int,将float键入为float,将DateTime键入为日期等的好方法。



