: >         "startTime":"2013-02-10T18:36:07.000Z"
        ...
: handler. It gets added successfully but when I retrieve this document back
: using "id" I get following.
        ...
: >         "startTime":"2013-02-10T18:36:07Z",
        ...
: As you can see, the milliseconds precision in date field "startTime" is
: lost. Precision is preserved for non-zero milliseconds but it's being lost
: for zero values. The field type of "startTime" field is as follows.
        ...
: Does anyone know how I can preserve milliseconds even if its zero? Or is it
: not possible at all?

ms precision is being preserved -- but as you mentioned, the fractional 
seconds you indexed are "0" therefore they are not needed/preserved when 
writing the response to maintain ms precision.  

This is the correct formatting as specified in the specification for the 
time format that Solr follows...

https://lucene.apache.org/solr/guide/working-with-dates.html
https://www.w3.org/TR/xmlschema-2/#dateTime

>>> 3.2.7.2 Canonical representation
>>> ...
>>> The fractional second string, if present, must not end in '0';



-Hoss
http://www.lucidworks.com/

Reply via email to