title: Post JSON data to elastic search using curl command
body: <p>I am trying to post Json file to elastic search and facing below errors</p>
  
  <pre><code>curl -XPOST http://localhost/test-index/doc -H "Content-Type: application/json" -d @test.json
  
  </code></pre>
  
  <pre><code>{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Rejecting mapping update to [test-index] as the final mapping would have more than 1 type: [_doc, doc]"}],"type":"illegal_argument_exception","reason":"Rejecting mapping update to [test-index] as the final mapping would have more than 1 type: [_doc, doc]"},"status":400}
  </code></pre>
  
  <p>test.json content</p>
  
  <pre><code>{
    "name":"John Smith",
     "age":"38"
  
  }
  
  </code></pre>
  
  <p>am I missing anything</p>