# My Graph feature is complaining for fielddata Enablement

**URL:** <https://discuss.elastic.co/t/my-graph-feature-is-complaining-for-fielddata-enablement/212377>\
**Category:** Kibana\
**Created:** [December 18, 2019, 5:25pm UTC](https://discuss.elastic.co/t/my-graph-feature-is-complaining-for-fielddata-enablement/212377 "2019-12-18T17:25:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NareshD](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@NareshD](https://discuss.elastic.co/u/NareshD)\
**Post date:** [December 18, 2019, 5:25pm UTC](https://discuss.elastic.co/t/my-graph-feature-is-complaining-for-fielddata-enablement/212377/1 "2019-12-18T17:25:56Z")

</div>

Here is Sample/ Test schema format for My JSON

{"eventTime":"2019-12-04T22.14.47.83+0000","action":[{"targetId":"XYZZZZZZZ","sources":["FIRST","SECOND"],"type":"write"},{"targetId":"batch-123456","type":"write"}],"outcome":"success","reason":{"reasonCode":"To save enriched"},"initiator":{"id":"iam-TEST","typeURI":"service/security","name":"nifi-process-1","credential":{"type":"apiKey"},"host":{"address":"11.1.1.1"}},"target":[{"id":"Target-ID-1","typeURI":"URI","name":"crn:v1", "addresses":[{"url":"cos://sample.csv","name":"","port":""}],"startOffset":0,"endOffset":10000},{"id":"batch-1","typeURI":"ibm/wffh/lineage","name":"lineage-event","startOffset":-1,"endOffset":-1}],"observer":{"id":"Observer-1","name":"DL"}}

Through Developer Tools I make this call

**GET demo/\_mapping**

And Response is pasted below

{  
"party" : {  
"mappings" : {  
"properties" : {  
"action" : {  
"properties" : {  
"sources" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"targetId" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"type" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
}  
},  
"eventTime" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"initiator" : {  
"properties" : {  
"credential" : {  
"properties" : {  
"type" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
}  
},  
"host" : {  
"properties" : {  
"address" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
}  
},  
"id" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"name" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"typeURI" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
}  
},  
"observer" : {  
"properties" : {  
"id" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"name" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
}  
},  
"outcome" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"reason" : {  
"properties" : {  
"reasonCode" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
}  
},  
"target" : {  
"properties" : {  
"addresses" : {  
"properties" : {  
"name" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"port" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"url" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
}  
},  
"endOffset" : {  
"type" : "long"  
},  
"id" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"name" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"startOffset" : {  
"type" : "long"  
},  
"typeURI" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
}  
}  
}  
}  
}  
}

I enable the fielddata like this

PUT demo/\_mapping  
{  
"properties": {  
"initiator.id": {  
"type": "text",  
"fielddata": true  
}  
}  
}

My question is if I need to find relation between 2 fields in the Graph or say more than 3, do I need to enable fielddata for all those fields ?

Right now I am seeing this Error

Error 400 Bad Request: Fielddata is disabled on text fields by default. Set fielddata=true on [[initiator.id](http://initiator.id/)] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.

If someone can respond to this Query quick, will be of great help.

---

<div class="post-metadata">

**Author:** ![LizaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lizad/32/51074_2.png) [@LizaD](https://discuss.elastic.co/u/LizaD)\
**Post date:** [December 18, 2019, 6:37pm UTC](https://discuss.elastic.co/t/my-graph-feature-is-complaining-for-fielddata-enablement/212377/2 "2019-12-18T18:37:22Z")

</div>

Hi @NareshD

The error is stating that field data on text fields is disabled, so you can set field data to true on the initiator.id field as it is a text field or use keyword field instead.

Here are some links I found on setting the field data, that may help:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/fielddata.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/fielddata.html)

> <https://stackoverflow.com/questions/38145991/how-to-set-fielddata-true-in-kibana>

Thanks,  
Liza

---

<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:** [January 15, 2020, 6:37pm UTC](https://discuss.elastic.co/t/my-graph-feature-is-complaining-for-fielddata-enablement/212377/3 "2020-01-15T18:37:24Z")

</div>

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