Activeadmin Destroy Record with Exception Elasticsearch::Transport::Transport::Errors::NotFound in Admin [404]
<p>I've configured Elasticsearch in my Rails application API and for Post model, it's working properly and I'm using <code>@post.destroy!</code> to delete a specific record without any problem, but when I'm trying the same through Activeadmin panel destroy action (I tried default destroy action and custom controller -> destroy action ), <strong>here what's happening is deleting the record properly from db but after deleting it throws an exception</strong>:</p>

<pre><code>Elasticsearch::Transport::Transport::Errors::NotFound in Admin::PostsController#destroy

[404] {"found":false,"_index":"posts","_type":"post","_id":"1802","_version":1,"_shards":{"total":2,"successful":1,"failed":0}}
</code></pre>