This post on stackoverflow has a good run-down on your options: http://stackoverflow.com/questions/1555610/solr-dih-how-to-handle-deleted-documents/1557604#1557604
If you're using DIH, you can get more information from: http://wiki.apache.org/solr/DataImportHandler The easiest thing, if using a delta import is to add "deletePkQuery" on your entity like this: <entity name="..." query="..." deltaQuery="..." deltaImportQuery="..." deletedPkQuery="SELECT ID FROM MY_TABLE WHERE DELETED='Y'" /> Another approach is to have a second top-level entity that uses the special command: <entity name="Deletes" query="SELECT ID AS '$deleteDocById' FROM MY_TABLE WHERE DELETED='Y'" /> This second approach works if you use DIH but do delta updates using the approach described here: http://wiki.apache.org/solr/DataImportHandlerFaq#fullimportdelta James Dyer E-Commerce Systems Ingram Content Group (615) 213-4311 -----Original Message----- From: hassancrowdc [mailto:hassancrowdc...@gmail.com] Sent: Thursday, January 24, 2013 12:19 PM To: solr-user@lucene.apache.org Subject: Re: Deletion from database ok, how can i issue delete for each item deleted since the last successful update? Do i write something like delete query with delta import query in dataconfig? If so, what will i add in dataconfig for deletion? -- View this message in context: http://lucene.472066.n3.nabble.com/Deletion-from-database-tp4036018p4036026.html Sent from the Solr - User mailing list archive at Nabble.com.