# User defined type question

**URL:** <https://discuss.elastic.co/t/user-defined-type-question/8217>\
**Category:** Elasticsearch\
**Created:** [June 25, 2012, 4:32pm UTC](https://discuss.elastic.co/t/user-defined-type-question/8217 "2012-06-25T16:32:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwray](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jwray/32/2837_2.png) [@jwray](https://discuss.elastic.co/u/jwray)\
**Post date:** [June 25, 2012, 4:32pm UTC](https://discuss.elastic.co/t/user-defined-type-question/8217/1 "2012-06-25T16:32:27Z")

</div>

Hi,

not sure if I'm just missing something obvious or what I'm trying to do  
isn't supported.

I have two mapping types, protein and taxon, that have the usual number of  
fields etc. and I store documents of both types in the search engine. The  
issue is that the protein type has a field of type taxon and I was  
wondering if there is a way of not repeating my taxon object mapping  
definition in both the taxon.json file and the protein.json file. Or put it  
another way, can the protein mapping use the taxon mapping from another  
file?

thanks  
Jonny

---

<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 6, 2017, 3:22am UTC](https://discuss.elastic.co/t/user-defined-type-question/8217/2 "2017-07-06T03:22:38Z")

</div>

Closed on July 6, 2017, 3:22am UTC


