title: Storing date time in java elasticsearch
body: <p>I am trying to store the date time of an entity that is being created. I used <code>org.joda.time.DateTime.now()</code> to create a <code>DateTime</code> object. But it gets stored in the elasticsearch as</p>
  
  <pre><code>{"centuryOfEra":20,"yearOfEra":2016,"yearOfCentury":16,"weekyear":2016,"monthOfYear":5,"weekOfWeekyear":18,"hourOfDay":15,"minuteOfHour":25,"secondOfMinute":28,"millisOfSecond":431,"dayOfYear":128,"year":2016,"dayOfMonth":7,"dayOfWeek":6,"era":1,"millisOfDay":55528431,"secondOfDay":55528,"minuteOfDay":925,"chronology":{"zone":{"fixed":false,"uncachedZone":{"cachable":true,"fixed":false,"id":"America/Los_Angeles"}
  </code></pre>
  
  <p>is there a way to specify a format in which the object gets stored like <code>May 07 2016 14:58:44</code>? If we store it as strings would we still get the performance advantage of doing range queries?</p>