# Tutorial on adding a new field type

**URL:** <https://discuss.elastic.co/t/tutorial-on-adding-a-new-field-type/10083>\
**Category:** Elasticsearch\
**Created:** [December 16, 2012, 9:47pm UTC](https://discuss.elastic.co/t/tutorial-on-adding-a-new-field-type/10083 "2012-12-16T21:47:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathias\_Herberts](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mathias_herberts/32/2574_2.png) [@Mathias\_Herberts](https://discuss.elastic.co/u/Mathias_Herberts)\
**Post date:** [December 16, 2012, 9:47pm UTC](https://discuss.elastic.co/t/tutorial-on-adding-a-new-field-type/10083/1 "2012-12-16T21:47:27Z")

</div>

I've been digging around the codebase and it appears adding a custom field  
type (i.e. a new mapping), is rather daunting given the lack of  
documentation!

Is there a tutorial somewhere on the path to follow to add a new mapping to  
ES?

Mathias.

--

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [December 16, 2012, 10:44pm UTC](https://discuss.elastic.co/t/tutorial-on-adding-a-new-field-type/10083/2 "2012-12-16T22:44:36Z")

</div>

Hi,

Did you have a chance to look at attachments plugin?

Regards,  
Lukas

Dne neděle, 16. prosince 2012, Mathias Herberts napsal(a):

> I've been digging around the codebase and it appears adding a custom field  
> type (i.e. a new mapping), is rather daunting given the lack of  
> documentation!
> 
> Is there a tutorial somewhere on the path to follow to add a new mapping  
> to ES?
> 
> Mathias.
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Mathias\_Herberts](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mathias_herberts/32/2574_2.png) [@Mathias\_Herberts](https://discuss.elastic.co/u/Mathias_Herberts)\
**Post date:** [December 16, 2012, 11:33pm UTC](https://discuss.elastic.co/t/tutorial-on-adding-a-new-field-type/10083/3 "2012-12-16T23:33:40Z")

</div>

Thanks for the hint, this code still lacks comments but is simpler to  
understand.

On Sun, Dec 16, 2012 at 11:44 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Hi,
> 
> Did you have a chance to look at attachments plugin?
> 
> Regards,  
> Lukas
> 
> Dne neděle, 16. prosince 2012, Mathias Herberts napsal(a):
> 
> > I've been digging around the codebase and it appears adding a custom  
> > field type (i.e. a new mapping), is rather daunting given the lack of  
> > documentation!
> > 
> > Is there a tutorial somewhere on the path to follow to add a new mapping  
> > to ES?
> > 
> > Mathias.
> > 
> > --
> 
> --

--

---

<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, 2:59am UTC](https://discuss.elastic.co/t/tutorial-on-adding-a-new-field-type/10083/4 "2017-07-06T02:59:42Z")

</div>


