Hi
To explain the problem there is a schema :
I have 3 log sources. First, log files that come from the SBC are processed by logstash and index in elasticsearch. The document ID (_id) is set to the call ID.
Then, the second source of log is the SVI. In this log file I have the same call ID as in SBC log file. Log files are processed by logstash and the output is a file that contains a lot of bulk instruction like :
{ "update" : {"_id" : "SD86mha1-d2915bef605b544a7a6f5da290549d57-v300g00060", "_type" : "type", "_index" : call"}}
{ "doc": {"a" : true , "b" : "lala", "c" : "dfe", "id2" : "abcdefghij123"}}
The "SD86mha1-d2915bef605b544a7a6f5da290549d57-v300g00060" is the call ID that is already the _id of an elasticsearch document.
When I execute this request it works and my existing document win 4 fieds (a,b,c,id2)
This is what is in the green rectangle and it works.
Now I want to add what is in the red rectangle. That means that I want to add a third log source (SIP server). The problem is that I can't use the bulk API because the common field beetween the existing doccument and the SVI server log is the id2 that was previously added and not the id of the document (_id). If I sent this request
{ "update" : {"id2" : "abcdefghij123", "_type" : "type", "_index" : call"}}
{ "doc": {"d" : true , "e" : "hoho"}}
I obtain :
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Action/metadata line [1] contains an unknown parameter [id2]"
}
],
"type": "illegal_argument_exception",
"reason": "Action/metadata line [1] contains an unknown parameter [id2]"
},
"status": 400
}
How can I add field from the third log source ?