I had similar task but I simply used SolrJ client for that; I was forced to keep track on deleted docs in table_document... now, I am using "delete by query" (with SolrJ) - each document has a timestamp which I query...
For instance, you can update (allowOverwrite=true) whole SOLR index, but put current timestamp on each document; then delete by query all exprired documents -Fuad -----Original Message----- From: clico [mailto:cl...@mairie-marseille.fr] Sent: August-21-09 5:58 AM To: solr-user@lucene.apache.org Subject: Re: Remove data from index hossman wrote: > > : > The request I would like to write is > : > > : > "Delete from my solr Index the id that are no longer present in my > : > table_document" > : > > : > With Lucene I had a way to do that : > : > open IndexReader, > : > for each lucene document : check in table_document and remove in > lucene > : > index if document is no longer present in the table > > you can still do that with Solr, you can even do it as a Solr plugin (I > would suggest a RequestHandler that you hit after each DIH call) so > you can reuse your existing code that deals directly with an IndexReader > -- but you'd probably want to tweak it a bit to use the UpdateHandler from > the SolrCore instead of deleting the doc direclty, that way it's logged > properly and you can trigger a commit to make Solr aware you've modified > the index. > > -Hoss > I read this answer and tried to understand the way to write new RequestHandler I think i begin to understand but don't see the way to implement it to resolve my problem. If I lit my CustomRequestHandler after each DIH how can it solve my delta pb as the DIH -- View this message in context: http://www.nabble.com/Remove-data-from-index-tp25063736p25076138.html Sent from the Solr - User mailing list archive at Nabble.com.