I want to delete old documents from elastic whenever a new record is inserted with the same request_id through logstash
Example:
Suppose my first log to be inserted in elastic is
If you are indexing into a single index and not using time-based indices you would need to consistently use the request_id as document id to make the second document override the first. If not, then you need to explicitly perform a delete operation as there is no automatic way to ensure uniqueness across indices.
You are also running a very old version that has been EOL for a long time, so I would recommend you upgrade to the latest version.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.