Elasticsearch-py date malformed
<p>I am trying to index some data but I keep getting the error </p>

<pre><code>error: reason: failed to parse [date] type: mapper_parsing_exception, caused_by: Invalid format: 2016-08-12\t17:35:26 is malformed at \t17:35:26
</code></pre>

<p>My mapping looks like</p>

<pre><code>'date': { 'type': 'date', 'format': 'dateOptionalTime' },
</code></pre>

<p>Is there a different way to create the date mapping?</p>

<p>EDIT: Here is a line from the document.  I can get it to index just fine when I set time to string and date to date but the date shows a bogus time attached to it.  So it looks like ES is taking my date (2016/9/20) and adding a time to it.  In my case it adds 19:00:00.  Which is why I can't figure out why it doesnt like the time.</p>

<pre><code>2016-06-14  18:12:35    1.1.1.1 GET /origin-www.origin.com/Images/pipe-gray.png?    200 1442    0   "http://www.origin.com/Main.css"    "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36" "__qca=P0-920525163; s_fid=4CDFF16906A35CC4; __CSCookie=z5ayStQYdIbcPTxGKyhsjRIi0peP5GAP6K; icxid=1459286804904; icxid=1459286804904; ASP.NET_SessionId=dzg3esjzp4tpg; __SessionCookie=gXA9BuDiF245ZJeuh; dtCookie=0C05828501CE759D; s_vi=[CS]v1|2A069D04051D2E2A; __CSUserIbcIDCookie=NL7VeN+rh05z5FWSCgTnzTC6G;"
</code></pre>

<p>Before adding the date to hashtable or before u feed it to json, convert the date "2016-02-10\t10:25:30" to this "2016-02-10T10:25:30" </p>

<p>If you give elasticsearch this format, you should be able to use the original mapping - dateOptionalTime. </p>

python elasticsearch