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] 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.