Remove duplicate _id from difference index

I have 2 indexes that might have same object id, but it will have one
that have _version higher.
In ES, Do it have some script of setting that help manage this kind of
problem?

because I want to keep only highest _version document.

Thanks,
Udomsak

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6c33ecdd-70d8-46b0-b855-99fbec2e5dfb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.