# How custom mapping at elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-custom-mapping-at-elasticsearch/193765>\
**Category:** Elasticsearch\
**Created:** [August 5, 2019, 10:22am UTC](https://discuss.elastic.co/t/how-custom-mapping-at-elasticsearch/193765 "2019-08-05T10:22:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![psanggabuana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/psanggabuana/32/51625_2.png) [@psanggabuana](https://discuss.elastic.co/u/psanggabuana)\
**Post date:** [August 5, 2019, 10:22am UTC](https://discuss.elastic.co/t/how-custom-mapping-at-elasticsearch/193765/1 "2019-08-05T10:22:16Z")

</div>

I have a problem to showing string variable on grafana graph.  
I have a error like this:

"Fielddata is disabled on text fields by default. Set fielddata=true on [....] in order to load fielddata in memory by uninverting the inverted index."

Can you help me for this?  
I read many tutorials that say about " PUT my\_index ...".  
Im confused, how runs PUT command to enable fielddata.

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [August 5, 2019, 11:27am UTC](https://discuss.elastic.co/t/how-custom-mapping-at-elasticsearch/193765/2 "2019-08-05T11:27:34Z")

</div>

Before you go and enable fielddata, I think there may be an better solution for you. By default, whenever you index a string field into Elasticsearch, [it will create a `.keyword` multi-field](https://www.elastic.co/blog/strings-are-dead-long-live-strings). Those multi-fields are of [type keyword](https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html), and do not require enabling fielddata. If you haven't already provided a mapping yet, those `.keyword` multi-fields should be available to you.

This multi-field can be accessed by simply adding `.keyword` to the field name. So, if you were trying to visualize a field called `foo`, try visualizing the field `foo.keyword` instead.

---

<div class="post-metadata">

**Author:** ![psanggabuana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/psanggabuana/32/51625_2.png) [@psanggabuana](https://discuss.elastic.co/u/psanggabuana)\
**Post date:** [August 5, 2019, 11:40am UTC](https://discuss.elastic.co/t/how-custom-mapping-at-elasticsearch/193765/3 "2019-08-05T11:40:42Z")

</div>

Oke thank you, I will try it..

Can I ask you about kibana or grafana?  
Do you have experience about alerting on kibana or grafana?

I read many tutorial about alerting that say alerting of kibana need license? Is it true?  
Because it, now I want explore alerting of grafana.

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [August 5, 2019, 11:53am UTC](https://discuss.elastic.co/t/how-custom-mapping-at-elasticsearch/193765/4 "2019-08-05T11:53:26Z")

</div>

Yeah, Alerting in the Elastic Stack is a paid feature - it requires a Gold subscription.

I am not familiar with Grafana nor its alerting functionality.

---

<div class="post-metadata">

**Author:** ![psanggabuana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/psanggabuana/32/51625_2.png) [@psanggabuana](https://discuss.elastic.co/u/psanggabuana)\
**Post date:** [August 5, 2019, 12:03pm UTC](https://discuss.elastic.co/t/how-custom-mapping-at-elasticsearch/193765/5 "2019-08-05T12:03:54Z")

</div>

Hmm..

For alerting feature, is it paid feature?  
I need paid for elastic or kibana?

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [August 5, 2019, 12:59pm UTC](https://discuss.elastic.co/t/how-custom-mapping-at-elasticsearch/193765/6 "2019-08-05T12:59:11Z")

</div>

Kibana is part of the Elastic Stack. What you pay for is support for the Elastic Stack, including Kibana. This page has all the details: [https://www.elastic.co/subscriptions](https://www.elastic.co/subscriptions)

---

<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:** [September 2, 2019, 12:59pm UTC](https://discuss.elastic.co/t/how-custom-mapping-at-elasticsearch/193765/7 "2019-09-02T12:59:11Z")

</div>

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