title: How apply new mapping with bulk api in Python?
body: <p>I use <code>bulk</code> API to copy documents from a remote elasticseach to the local one. I would like to apply new mapping. In the first function I apply new mapping as bellows:</p>
  
  <pre><code>def create_mapping(es, idx, document_type):
      mymapping = {"mappings": {document_type: { \
          "properties": { \
              "prijs": {"type": "integer"},\
              "datum": {"type": "date"},\
              "kilometerstand": {"type": "integer"}
              }}}}
  
      if es.indices.exists(index=idx):
          es.indices.delete(index=idx)
  
      es.indices.create(index=idx, body=mymapping)
  </code></pre>
  
  <p>And in the second function I use <code>bulk</code> to copy the documents:</p>
  
  <pre><code>def copy_index(remote_es, local_es, idx):
      ....
      bulk(local_es, response_list, chunk_size=5000)
  </code></pre>
  
  <p>But I get the error: <code>document(s) failed to index</code></p>
  
  <p><strong>Edit</strong></p>
  
  <p>If I add multiple two documents by <code>bulk</code> it shows:</p>
  
  <pre><code>raise BulkIndexError('%i document(s) failed to index.' % len(errors), errors) BulkIndexError: (u'2 document(s) failed to index.', [{u'index': {u'status': 400, u'_type': u'kliks', u'_index': u'logstash-2018.02.07', u'error': {u'caused_by': {u'reason': u'Invalid format: "2018-02-07 01:00:51" is malformed at " 01:00:51"', u'type': u'illegal_argument_exception'}, u'reason': u'failed to parse [datum]', u'type': u'mapper_parsing_exception'}, ....
  </code></pre>