Closed YannRobert closed 8 years ago
I'm puzzled. Why would you want this? Elasticsearch will already have the _id
as part of the document. You want to have this data duplicated?
Yes, I want to get the same document from ElasticSearch as the one I get from CouchDB.
I need to be able to map (unmarshall) a JSON document to the same application's model Object (Java language) the same way whether I get it from ElasticSearch or CouchDB.
I could workaround with :
filter {
mutate {
add_field => { "[doc][_id]" => "%{[@metadata][_id]}" }
}
}
but it's unnatural to remove a field just to re-add it after.
Since we have a config to 'keep_revision', it seems natural to have a config for 'keep_id'.
Does this sound reasonable?
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.
introduced new config 'keep_id' that allows to keep the '_id' field in the document, just like the 'keep_revision' config allows to keep the '_rev' field