I ran in to some issues whilst trying to use statistical facets on my documents in Elastic Search. This resulted in the following posts on the Elastic Search google group -
Try to map you object as followed:
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
)
)
);
The client.MapFromAttributes()
is very limited and will probably be removed in the 1.0 release. Its great to annotate property names but quickly becomes limitted in what it can express. The MapFromAttributes() in the mapfluent call is still a great way to type int's as int, float's as floats, DateTime's as dates etcetera.