I'm using Logstash 1.4.1 together with ES1.01 and would like to replace already indexed documents based on a calculated checksum. I'm currently using the "fingerprint" filter in Logstash which creates a "fingerprint" field based on a specified algorithm. Now - what I want to accomplish is that ES replaces an already existing document based on an identical fingerprint value.
Say, for example that I have a document with a fingerprint-field value of "2c9a6802e10fbcff36177e0b88993f90868fa6fa". Now - if a document with an identical fingerprint value is about to be indexed, I want it to replace the old document already present in the index.
I've tried to add the following to the "elasticsearch-template.json" template file which I assume is used by the Logstash ES-output plugin:
...
"mappings" : {
"_default_" : {
"_id" : {"index": "not_analyzed", "store" : false, "path" : "fingerprint" },
"_all" : {"enabled" : true},
"dynamic_templates" : [ {
...
but it doesn't work. What am I doing wrong here?
Cheers