Uhhhm HttpSolrServer.deleteById (several varieties)?

http://lucene.apache.org/solr/api-4_0_0-BETA/org/apache/solr/client/solrj/SolrServer.html#deleteById(java.util.List)

the rest of your question is confusing.

bq: how can I reindex in the same way one particular row

Solr does that automatically for you based on id (<uniqueKey> in your
schema). Just index the doc
again and and Solr will replace the old document with that id with the new one.

Best
Erick

On Sun, Apr 21, 2013 at 1:21 AM, Tania Marinova <taniamm2...@yahoo.com> wrote:
> 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 <s...@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

Reply via email to