title: Version conflict when using the delete method of elasticsearch-dsl
body: <p>So, we're using elasticsearch in our Django project, and we're using the elasticsearch-dsl python library.</p>
  
  <p>We got the following error in production:</p>
  
  <pre><code>ConflictError(409, '{"took":7,"timed_out":false,"total":1,"deleted":0,"batches":1,"version_conflicts":1,"noops":0,"retries":{"bulk":0,"search":0},"throttled_millis":0,"requests_per_second":-1.0,"throttled_until_millis":0,"failures":[{"index":"events","type":"_doc","id":"KJ7SpWsBZnen1jNBRWWM","cause":{"type":"version_conflict_engine_exception","reason":"[KJ7SpWsBZnen1jNBRWWM]: version conflict, required seqNo [1418], primary term [1]. current document has seqNo [1419] and primary term [1]","index_uuid":"2-fSZILVQzuJE8KVmpLFXQ","shard":"0","index":"events"},"status":409}]}')
  </code></pre>
  
  <p>And with better formatting:</p>
  
  <pre><code>{
      "took": 7,
      "timed_out": false,
      "total": 1,
      "deleted": 0,
      "batches": 1,
      "version_conflicts": 1,
      "noops": 0,
      "retries": {
          "bulk": 0,
          "search": 0
      },
      "throttled_millis": 0,
      "requests_per_second": -1.0,
      "throttled_until_millis": 0,
      "failures": [
          {
              "index": "events",
              "type": "_doc",
              "id": "KJ7SpWsBZnen1jNBRWWM",
              "cause": {
                  "type": "version_conflict_engine_exception",
                  "reason": "[KJ7SpWsBZnen1jNBRWWM]: version conflict, required seqNo [1418], primary term [1]. current document has seqNo [1419] and primary term [1]",
                  "index_uuid": "2-fSZILVQzuJE8KVmpLFXQ",
                  "shard": "0",
                  "index": "events"
              },
              "status": 409
          }
      ]
  }
  </code></pre>
  
  <p>The code that produced the error was this call to the dsl <code>delete</code> method:</p>
  
  <pre><code>connections.create_connection(
      hosts=[settings.ELASTICSEARCH_HOST],
      timeout=20,
  )
  search = EventDocument.search()
  # The query is made by the django model's id
  search.query('match', id=self.id).delete()
  </code></pre>
  
  <p>And here's the definition of <code>EventDocument</code>:</p>
  
  <pre><code>from elasticsearch_dsl import (
      Document,
      Integer,
  )
  
  
  class EventDocument(Document):
      id = Integer()
      # other fields
  </code></pre>
  
  <p>Our biggest issue right now is that we don't have access to the server, we got the error through an automated email we configured for errors. So I don't even know how to reproduce it.</p>
  
  <p>Hope you can help, thanks.</p>