title: Pushing JSON files to elasticsearch using Python Script: Works but does not show up in Kibana
body: <p><strong>Background Information:</strong></p>
  
  <p>Hi,</p>
  
  <p>I've been trying to push JSON files into Elasticsearch using a custom script, the script runs and finishes - however, when I check Elasticsearch and Kibana the index exists but none of the docs that I'm sending are uploaded. I've done this a countless number of times. Not sure where I am going wrong since this has worked before - </p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>#Change the IP as desiered 
  es = Elasticsearch(
       ['localhost'],
       timeout=420000,
       port=9200
   )
  
  print ("Start")
  
  #Append to this list if all files from a folder have been uploaded 
  done_list = []
  filenames = os.listdir("/home/directory/file_json")
  print(filenames)
  
  for current_folder in filenames:
      for f in glob.glob("/home/directory/file_json/"+current_folder+"/*.json"):
          print("File Open")
          MyFile = open(f).read()
          print("Bulking - "+f)
          es.bulk(MyFile,"test","_doc")
          print("done elasticsearch")
    done_list.append(current_folder)
    print(current_folder + " done")
  
  print ("Finished")
  </code></pre>
  
  <p>If anyone could let me know if this has some sort of error or maybe something I'm missing that would be greatly appreciated.</p>