title: Want to delete documents from elasticsearch which are deleted from database
body: <p>I want to delete records from Elasticsearch for below use-case. What are the possible resolutions?</p>
  
  <p>Fetching data from database through logstash and adding into Elasticsearch.</p>
  
  <p>document_id is combination of key + some additional information.</p>
  
  <p>logstash is running every few minutes to fetch latest created/modified data based timestamp.</p>
  
  <p>In my scenario, we have history table for every table. So, when record has been deleted from main table, it will be added into history table with DELETE action.</p>
  
  <p>I have 4-5 indexes for different purposes.</p>
  
  <p>Now, I want to update/remove this related record from Elasticsearch indexes.</p>
  
  <p>What are the best resolutions?</p>
  
  <p>My thoughts,   </p>
  
  <ol>
  <li>are there any facility using logstash or any other plugin through which I can fetch those deleted records and delete from Elasticsearch?</li>
  <li>is it good to implement cron job using spring-boot to deleted records from Elasticsearch?</li>
  </ol>