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

**URL:** <https://discuss.elastic.co/t/elasticsearch-client-net-need-help-create-index-mapping-nested-field-type/341786>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [August 28, 2023, 7:33am UTC](https://discuss.elastic.co/t/elasticsearch-client-net-need-help-create-index-mapping-nested-field-type/341786 "2023-08-28T07:33:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_Vo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steven_vo/32/125003_2.png) [@Steven\_Vo](https://discuss.elastic.co/u/Steven_Vo)\
**Post date:** [August 28, 2023, 7:33am UTC](https://discuss.elastic.co/t/elasticsearch-client-net-need-help-create-index-mapping-nested-field-type/341786/1 "2023-08-28T07:33:37Z")

</div>

```auto
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

---

<div class="post-metadata">

**Author:** ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)\
**Post date:** [August 29, 2023, 3:10pm UTC](https://discuss.elastic.co/t/elasticsearch-client-net-need-help-create-index-mapping-nested-field-type/341786/2 "2023-08-29T15:10:13Z")

</div>

Hi @Steven_Vo ,

Have you checked this reference? [Fluent mapping | Elasticsearch.Net and NEST: the .NET clients [2.x] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/net-api/2.x/fluent-mapping.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 26, 2023, 3:10pm UTC](https://discuss.elastic.co/t/elasticsearch-client-net-need-help-create-index-mapping-nested-field-type/341786/3 "2023-09-26T15:10:52Z")

</div>

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