[Elasticsearch Client .Net] need help Create Index mapping Nested field type

public class EsProductEto
    {
        public Guid Id { get; set; }
        .....
        public List<EsAttributeEto> Items { get; set; }
    }
-----
public class EsAttributeEto
    {
        public Guid Id { get; set; }
        public string Label { get; set; }
        public object Value { get; set; }
        public string ValueText { get; set; }
    }

client.Indices.CreateAsync<EsProductEto>(_options.DefaultIndexName, c => c
            .Mappings(m => m
                .Properties (p => p
                    .Keyword(p => p.Id)
                    .Nested(p => p.Items, o => 
                        .Properties(cp => cp
                            .Keyword(p => p.Id)
                            .Keyword(p => p.Label)
                    )))
                ));
        }

Please help me !!. I have problem with Es Client .Net when create Index mapping. i cant find object p.Label, but only get properties in EsProductEto. Thanks All

Hi @Steven_Vo ,

Have you checked this reference? Fluent mapping | Elasticsearch.Net and NEST: the .NET clients [2.x] | Elastic

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.