lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pratik Patel <pra...@semandex.net>
Subject Solr not preserving milliseconds precision for zero milliseconds
Date Thu, 05 Oct 2017 22:11:16 GMT
Hello Everyone,

Say I have a document like one below.


> {
>         "id":"test",
>         "startTime":"2013-02-10T18:36:07.000Z"
> }


I add this document to solr index using the admin UI and "update" request
handler. It gets added successfully but when I retrieve this document back
using "id" I get following.


 {
>         "id":"test",
>         "startTime":"2013-02-10T18:36:07Z",
>         "_version_":1580456021738913792}]
>   }


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.

<fieldType name="date" class="solr.TrieDateField" positionIncrementGap="0"
> docValues="true" precisionStep="0"/>


Does anyone know how I can preserve milliseconds even if its zero? Or is it
not possible at all?

Thanks,
Pratik

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message