bq: dont have attribute modified just date_creation Well, assuming that your date_creation is set whenever you insert a record, just change the WHERE clause to WHERE date_creation > .......
But that doesn't help with updated records unless the date_creation is updated every time a field in an existing record is changed. I'd add a modified field to the database that's auto-updated whenever the row changes. And even _that_ doesn't help with deleted rows, since there's no record in the main table after the row is gone. People sometimes put triggers on the main table to insert a row in yet another table with a structure like timestamp, id, operation where id is a foreign key and the operation is something like add/delete/modify then the delta query actually goes against that table for figuring out what docs to update. Best, Erick On Wed, Jul 13, 2016 at 6:30 AM, kostali hassan <[email protected]> wrote: > I try to set deltaquery > >> deltaImportQuery="SELECT * from users WHERE id='${dih.delta.id}'" >> deltaQuery="SELECT id FROM users WHERE modified > >> '${dataimporter.last_index_time}'" > > But the database who i try to index dont have attribute modified just > date_creation > > 2016-07-13 14:11 GMT+01:00 Jamal, Sarfaraz < > [email protected]>: > >> Hi Kostali, >> >> I would look at the Delta Queries - >> >> Sas >> >> -----Original Message----- >> From: kostali hassan [mailto:[email protected]] >> Sent: Wednesday, July 13, 2016 5:17 AM >> To: [email protected] >> Subject: Update index >> >> I am using solr 5.4 1 to index sql database with data import handler. >> I am looking for update index automatically when the database is modified >> or insert in it new value. >>
