Here's a couple more options: http://stackoverflow.com/questions/1555610/solr-dih-how-to-handle-deleted-documents/
<http://stackoverflow.com/questions/1555610/solr-dih-how-to-handle-deleted-documents/> Cheers, Mauricio On Mon, Dec 28, 2009 at 5:51 PM, Mohamed Parvez <par...@gmail.com> wrote: > I am using Solr 1.4 and DIH to build the index from a table. > > I use full import once to create the index and then i keep using delta > import to update the index. > > All woks fine as long a the table gets added with only new rows. > > if there are some rows in the table that get deleted then the index does > not > get updated and has stale data. > > I have looked into the below options: > > 1] deletedPkQuery and deltaImportQuery :- > Both are of no use, as there is no way any DB SQL query can return the row > from the table, if the row is already deleted from the table. > > 2] preImportDeleteQuery and postImportDeleteQuery :- > Both are of no use, as they work only with full import. ( Also there is no > way any DB SQL query can return the row from the table, if the row > is already deleted from the table) > > 3] Creating a new field in the table, named delete, and setting it as true > and instead of actually deleting the row from the table:- > This is not possible as that table is a sort of getting updated from > external content management system, with news updates and has 1000 of new > rows added and 1000 deleted every hour. Cant keep the rows in the table > when > when the content has expired. > > Am I missing something? How to keep the Index updated when the rows are > deleted from the table. > > > ------ >