lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fuad Efendi" <>
Subject RE: Remove data from index
Date Fri, 21 Aug 2009 14:38:30 GMT
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


-----Original Message-----
From: clico [] 
Sent: August-21-09 5:58 AM
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
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:
Sent from the Solr - User mailing list archive at

View raw message