# How to set mapping in filebeats?

**URL:** <https://discuss.elastic.co/t/how-to-set-mapping-in-filebeats/117578>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [January 30, 2018, 8:10am UTC](https://discuss.elastic.co/t/how-to-set-mapping-in-filebeats/117578 "2018-01-30T08:10:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Feng\_Mi](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@Feng\_Mi](https://discuss.elastic.co/u/Feng_Mi)\
**Post date:** [January 30, 2018, 8:10am UTC](https://discuss.elastic.co/t/how-to-set-mapping-in-filebeats/117578/1 "2018-01-30T08:10:05Z")

</div>

I want set the mapping in filebeat config. For example, there is a field name "use\_id", I want set the field type to text before create the index in es. But I don't know how to set the config.

---

<div class="post-metadata">

**Author:** ![Feng\_Mi](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@Feng\_Mi](https://discuss.elastic.co/u/Feng_Mi)\
**Post date:** [January 30, 2018, 8:54am UTC](https://discuss.elastic.co/t/how-to-set-mapping-in-filebeats/117578/2 "2018-01-30T08:54:17Z")

</div>

I have resolved by using my own fields.yml to set the mapping.😋

---

<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:** [February 27, 2018, 8:54am UTC](https://discuss.elastic.co/t/how-to-set-mapping-in-filebeats/117578/3 "2018-02-27T08:54:21Z")

</div>

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