On 4/20/2013 12:12 PM, Tania Marinova wrote:
> Hello I'm new to solr and especially solrj. I have made a java apllication 
> which can index my neut I can't findw inserted row in the database  (which is 
> what I want)
> But now I ask Is there any way to delete the index of this row if for example 
> the user decides to delete it from teh database so it has no longer to be 
> indexed in solr! Can you give me directions how to do that or maybe simple 
> code to change my code?()PS maube I should use deletebyid but I can't find 
> info how to use it

There's no way that Solr will know that you have deleted something from
your database.  You have to tell it somehow.  This is outside the scope
of a Solr help list.

Fortunately, there are people here (like myself) that do deal with this
problem in relation to Solr.  The way that we handle this for my setup
with MySQL is with a delete trigger.  Anytime anything is deleted from
the main database, the trigger adds the ID in the primary key to a
delete table.  My SolrJ application reads that table and keeps it
trimmed to a manageable size.

Thanks,
Shawn

Reply via email to