Upsert logstash output - Version not upcounting

Posted to logstash and have not had much luck with help. Hoping posting here may get somewhere. Idea is i have a document i want updated or inserted, existence based on a unique doc_id. I have it working where it updates, however it does not update the @version field.

I was under the impression this was functionality of the upsert api? I dont think it would be too difficult to write logstash code to do this, but if it is built into elasticsearch that would be the proper route:

Finallly, now the if statement is working, however the update feature into elasticsearch is still not working.

output{
if [EndpointValue] != [previousValue] {
elasticsearch {
hosts => ["localhost"]
index => "esb-endpoints"
action => "update"
doc_as_upsert => "true"
document_id => "%{Doc_id}"
}
}

my hopes are that the update would modify the field which has changed, as well a uptick the version number. Do i need to add the logic into logstash manually to pull @version and update it with a +1?

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