public override PutMappingDescriptor <Application> BuildMapping(PutMappingDescriptor <Application> map) { return(map .Dynamic() .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false)) .Properties(p => p .SetupDefaults() .String(f => f.Name(e => e.OrganizationId).IndexName("organization").Index(FieldIndexOption.NotAnalyzed)) )); }
public override PutMappingDescriptor <Employee> BuildMapping(PutMappingDescriptor <Employee> map) { return(base.BuildMapping(map .Dynamic(false) .TimestampField(ts => ts.Enabled().Path(u => u.UpdatedUtc).IgnoreMissing(false)) .Properties(p => p .SetupDefaults() .String(f => f.Name(e => e.Id).IndexName(Fields.Id).Index(FieldIndexOption.NotAnalyzed)) .String(f => f.Name(e => e.CompanyId).IndexName(Fields.CompanyId).Index(FieldIndexOption.NotAnalyzed)) .String(f => f.Name(e => e.CompanyName).IndexName(Fields.CompanyName).Index(FieldIndexOption.NotAnalyzed)) .String(f => f.Name(e => e.Name).IndexName(Fields.Name).Index(FieldIndexOption.Analyzed)) .Number(f => f.Name(e => e.Age).IndexName(Fields.Age)) ))); }
public override PutMappingDescriptor <Models.Token> BuildMapping(PutMappingDescriptor <Models.Token> map) { return(map .Dynamic(false) .IncludeInAll(false) .TimestampField(ts => ts.Enabled().Path(u => u.UpdatedUtc).IgnoreMissing(false)) .Properties(p => p .String(f => f.Name(u => u.OrganizationId).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.OrganizationId)) .String(f => f.Name(u => u.UserId).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.UserId)) .Date(f => f.Name(u => u.CreatedUtc).IndexName(Fields.CreatedUtc)) .Date(f => f.Name(u => u.UpdatedUtc).IndexName(Fields.UpdatedUtc)) .Date(f => f.Name(u => u.Refresh).IndexName(Fields.Refresh)) .Object <DataDictionary>(f => f.Name(u => u.Data).Dynamic(false)) )); }
public override PutMappingDescriptor <User> BuildMapping(PutMappingDescriptor <User> map) { return(map .Dynamic(false) .TimestampField(ts => ts.Enabled().Path(u => u.UpdatedUtc).IgnoreMissing(false)) .Properties(p => p .String(f => f.Name(u => u.EmailAddress).IndexName(Fields.EmailAddress).Analyzer("keyword_lowercase")) .String(f => f.Name(u => u.PasswordResetToken).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.PasswordResetToken)) .String(f => f.Name(u => u.VerifyEmailAddressToken).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.VerifyEmailAddressToken)) .Object <DataDictionary>(f => f.Name(u => u.Data).Dynamic(false)) .Object <OAuthAccount>(f => f.Name(o => o.OAuthAccounts.First()).RootPath().Properties(mp => mp .String(fu => fu.Name(m => m.ProviderUserId).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.OAuthAccountProviderUserId)))) .Object <Membership>(f => f.Name(o => o.Memberships.First()).RootPath().Properties(mp => mp.String(fu => fu.Name(m => m.OrganizationId).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.MembershipOrganizationId)))) )); }
public override PutMappingDescriptor <T> BuildMapping(PutMappingDescriptor <T> map) { return(base.BuildMapping(map.Dynamic())); }