lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tania Marinova <taniamm2...@yahoo.com>
Subject Re: using deletebyid with solrj
Date Sun, 21 Apr 2013 05:21:17 GMT
No m question was - if a user deletes a row from the database I of course know the id if that
row.

so my question is as I have the  abillity to index one partricular row (you saw my code)
how can I reindex in the same way one particular row assuming that I know the id of that row
(so i can select it) so it's no longer indexed in solr. My database is postgresql. 




________________________________
 From: Shawn Heisey <solr@elyograg.org>
To: solr-user@lucene.apache.org 
Sent: Saturday, April 20, 2013 11:40 PM
Subject: Re: using deletebyid with solrj
 

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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message