-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
client.CreateIndex(Index, c => c
.Mappings(m => m.Map<Docx>(p => p
.Properties(ps => ps.Attachment(a => a.FileField(t => t.Name(e => e.Foo))))
.Properties(ps => ps.String(s => s.Name(o => o.Title))))));will fail on a => a.FileField(t => t.Name(e => e.Foo) because AttachmentPropertyDescriptor.Dictionary is not initialized and has null value:
private AttachmentPropertyDescriptor<T> SetMetadataField<TDescriptor, TInterface>(Func<TDescriptor, TInterface> selector, string fieldName)
where TDescriptor : TInterface, new()
where TInterface : IProperty
{
selector.ThrowIfNull(nameof(selector));
var type = selector(new TDescriptor());
**this.Dictionary[fieldName] = type;**
return this;
}Metadata
Metadata
Assignees
Labels
No labels