Updated index to be:
public ContactIndex()
{
Map = contacts => from contact in contacts
select new
{
contact.Name,
PrimaryEmail_EmailAddress = contact.PrimaryEmail.EmailAddress,
PrimaryPhone_PhoneNumber = contact.PrimaryPhone.PhoneNumber,
};
Store(x => x.PrimaryEmail.EmailAddress, FieldStorage.Yes);
Store(x => x.PrimaryPhone.PhoneNumber, FieldStorage.Yes);
}
_session.Query<Contact, ContactIndex>().AsProjection<ContactIndex.IndexResult>().ToList()
Still none of EmailAddress,
PrimaryEmail_EmailAddress, PhoneNumber, PrimaryPhone_PhoneNumber have
any values.
On Thursday, February 23, 2012 8:58:04 AM UTC-5, Ayende Rahien wrote: