Save only unique events that are not yet stored in ES based on field value

You can do this by overwriting the document each time.

Use document_id => %{[data][attributes][cveID]} in the elasticsearch output.

If you really want to drop the document then you could use an elasticsearch filter to do a lookup and see if it exists. However, in my very limited experience that is fragile and does not work as well as you would expect (in that case possibly due to the way logstash processes batches).