# C# NEST - Multi fields mapping of a single field with attributes

**URL:** <https://discuss.elastic.co/t/c-nest-multi-fields-mapping-of-a-single-field-with-attributes/60945>\
**Category:** Elasticsearch\
**Created:** [September 19, 2016, 9:07pm UTC](https://discuss.elastic.co/t/c-nest-multi-fields-mapping-of-a-single-field-with-attributes/60945 "2016-09-19T21:07:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlalex83](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@dlalex83](https://discuss.elastic.co/u/dlalex83)\
**Post date:** [September 19, 2016, 9:07pm UTC](https://discuss.elastic.co/t/c-nest-multi-fields-mapping-of-a-single-field-with-attributes/60945/1 "2016-09-19T21:07:19Z")

</div>

Hi there,

I'm using NEST's attribute based mapping to map my document and I need to map a field to multiple fields so to store different versions based on different analyzers (e.g. name, name.not\_analyzed etc..).  
I don't seem to find a way to to do that with attribute mapping. Is it not implemented?

I've found how to do that with the AutoMap method (see below)

index.Mappings(maps =\> maps.Map(m =\>  
{  
m.AutoMap()  
.Properties(p =\> p  
.String(s =\> s  
.Name(n =\> n.Description).Analyzer("my\_analyzer")  
.Fields(f =\> f  
.String(fs =\> [fs.Name](http://fs.Name)("not\_analyzed").NotAnalyzed())  
)});

With this method though, I'm struggling to get the syntax right to define "fields" on a nested object's string property.

Any suggestions?

Thanks

---

<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:** [July 5, 2017, 10:19pm UTC](https://discuss.elastic.co/t/c-nest-multi-fields-mapping-of-a-single-field-with-attributes/60945/2 "2017-07-05T22:19:01Z")

</div>


