When cloning and retraining the job on existing historical data isn't desired or practical, you can effectively remove a window of time by using the model_snapshots API (https://www.elastic.co/guide/en/elasticsearch/reference/6.5/ml-apis.html#ml-api-snapshot-endpoint), as shown in the following steps:
- Stop the datafeed
- Find the last snapshot taken by using the GET model_snapshots API (and passing the desired end time)
- Revert to that earlier snapshot ID using the _revert API call, but also pass the delete_intervening_results flag to erase any results/anomalies that were created after the time the snapshot was created
- Start the datafeed at an appropriate time, that is, the end of the window of time that you want to ignore