Thanks Alessandro, I used the DIH as it is and no atomic updates was called with this DIH.
Add this script to my script transformation section and everything worked properly: var now = java.time.LocalDateTime.now(); var dtf = java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'"); var val = dtf.format(now); var hash = new java.util.HashMap(); hash.put('add', val); row.put('time_stamp_log', hash); The time_stamp_log no contains the log of the updates on documents and the created_date set one time. I think hash.put('add', val); fires the atomic updates on documents. But when I remove this part of script I got created_date field updated every time. Thanks for your help. On Tue, Feb 7, 2017 at 11:30 AM, alessandro.benedetti <a.benede...@sease.io> wrote: > Hi Mahomoud, > I need to double check but let's assume you use atomic updates and a > created_data stored with default to NOW. > > 1) First time the document is not in the index you will get the default > NOW. > 2) second time, using the atomic update you will update only a subset of > fields you send to Solr. > Under the hood Solr will fetch the existing Doc, change only few fields and > send it back to Solr. > created_date will have the date fetched from the old version of the > document, so the default will not be used this time. > > Have you tried ? > > Cheers > > > > ----- > --------------- > Alessandro Benedetti > Search Consultant, R&D Software Engineer, Director > Sease Ltd. - www.sease.io > -- > View this message in context: http://lucene.472066.n3. > nabble.com/Time-of-insert-tp4319040p4319122.html > Sent from the Solr - User mailing list archive at Nabble.com. >