Reputation: 1175
I'm working with Apache Nifi and trying to put data in ElasticSearch using the processor PutElasticsearch, and it worked pretty good since i tried to add a child/parent relation in elasticsearch and so add parent in my put request.
here is my mapping elasticsearch :
"mappings": {
"myparent": {
},
"mychild": {
"_parent": {
"type": "myparent"
},
"properties": {
"attr1": {
"type": "string"
},
"attr2": {
"type": "date",
"format": "dateOptionalTime"
},
"attr3": {
"type": "string"
}
}
}
}
here is how i manualy insert data in "mychild" type :
POST /myindex/mychild/1?parent=[IDParent]
{
"attr1" : "02020",
"attr2" : "2016-10-10",
"attr3" : "toto"
}
i didn't find how to spécify the parentID. Is there any way of doing it using PutElasticsearch other than using the processor InvokHTTP.
Thank you.
Upvotes: 1
Views: 787