Hi Maria/Gora, I see this as more of a problem with the timezones in which the Solr server and the database server are located. Is this true ? If yes, one more possibility of handling this scenario would be to customize DataImportHandler code as follows
1. Add one more configuration property named "dbTimeZone" at the entity level in "data-config.xml" file 2. While saving the lastIndexTime in the properties file, save it according to the timezone specified in the config so that it is in sync with the database server time. Basically customize the code so that all the time related updates to the dataimport.properties file should be timezone specific. On Wed, Sep 14, 2011 at 4:31 AM, Gora Mohanty <g...@mimirtech.com> wrote: > On Wed, Sep 14, 2011 at 11:23 AM, Maria Vazquez > <maria.vazq...@dexone.com> wrote: > > Hi, > > How do you handle the situation where the time on the server running Solr > > doesn¹t match the time in the database? > > Firstly, why is that the case? NTP is pretty universal > these days. > > > I¹m using the last_index_time saved by Solr in the delta query checking > it > > against lastModifiedDate field in the database but the times are not in > sync > > so I might lose some changes. > > Can we use something else other than last_index_time? Maybe something > like > > last_pk or something. > > One possible way is to edit dataimport.properties, manually or through > a script, to put the last_index_time back to a "safe" value. > > Regards, > Gora > -- Thanks and Regards Rahul A. Warawdekar