# Mapping model filed to document field

**URL:** <https://discuss.elastic.co/t/mapping-model-filed-to-document-field/64268>\
**Category:** Elasticsearch\
**Created:** [October 28, 2016, 10:02am UTC](https://discuss.elastic.co/t/mapping-model-filed-to-document-field/64268 "2016-10-28T10:02:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![valerioorfano](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@valerioorfano](https://discuss.elastic.co/u/valerioorfano)\
**Post date:** [October 28, 2016, 10:02am UTC](https://discuss.elastic.co/t/mapping-model-filed-to-document-field/64268/1 "2016-10-28T10:02:56Z")

</div>

Hi,

I have to design on my web app a list of linked "drop down list" from a document saved into my ES database. Therefore i've create a document containing all the values of my drop down lists'.  
Let's say called

"section","class", "subclass", "group", "subgroup"  
A 01 19 B 01  
A 01 20 B 01  
B 01 12 C 02

These list are dependent, each one from the previous one!(apart from section that is indipendent)

I need to map MyModel"model\_section" field to my document field "section" to retrieve all the distinc value from this field. How can i get it?  
Possibly i would map another model field "model\_class" to my document "class" field retrieveing all distinct value from that field based on the value chosen for "section".

Is this doable with elasticsearch? How can i do it?

Thanx valerio

---

<div class="post-metadata">

**Author:** ![valerioorfano](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@valerioorfano](https://discuss.elastic.co/u/valerioorfano)\
**Post date:** [October 28, 2016, 10:17am UTC](https://discuss.elastic.co/t/mapping-model-filed-to-document-field/64268/2 "2016-10-28T10:17:06Z")

</div>

Sorry, i think this is not the right forum to ask for this question.

Apologise!

---

<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:08pm UTC](https://discuss.elastic.co/t/mapping-model-filed-to-document-field/64268/3 "2017-07-05T22:08:48Z")

</div>

Closed on July 5, 2017, 10:08pm UTC


