lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ephraim Ofir" <Ephra...@icq.com>
Subject RE: How to delete documents from SOLR index using DIH
Date Thu, 26 Aug 2010 08:16:01 GMT
You have several options here:
1. Use the deletedPkQuery in delta import - you'll need to make a DB
query which generates the IDs to be deleted (something like: SELECT id
FROM your_table WHERE deleted = 1).
2. Add the $deleteDocById special command to your full/delta import.
3. Use preImportDeleteQuery/postImportDeleteQuery in your full/delta
query

If you want to use any of these separately from your import, you can put
them in a separate entity and do a full/delta import just on that
entity.

Ephraim Ofir


-----Original Message-----
From: Pawan Darira [mailto:pawan.darira@gmail.com] 
Sent: Thursday, August 26, 2010 9:01 AM
To: solr-user@lucene.apache.org
Subject: Re: How to delete documents from SOLR index using DIH

Thanks Erick. Your solution do make sense. Actually i wanted to know,
how to
use delete via query or unique id through DIH?

Is there any specific query to be mentioned in data-config.xml? Also Is
there any separate command like "full-import" ,"delta-import" for
deleting
documents from index?



On Thu, Aug 26, 2010 at 12:03 AM, Erick Erickson
<erickerickson@gmail.com>wrote:

> I'm not sure what you mean here. You can delete via query or unique
id. But
> DIH really isn't relevant here.
>
> If you've defined a unique key, simply re-adding any changed documents
will
> delete the old one and insert the new document.
>
> If this makes no sense, could you explain what the underlying problem
> you're
> trying to solve is?
>
> HTH
> Erick
>
> On Tue, Aug 24, 2010 at 8:56 PM, Pawan Darira <pawan.darira@gmail.com
> >wrote:
>
> > Hi
> >
> > I am using data import handler to build index. How can i delete
documents
> > from my index using DIH.
> >
> > --
> > Thanks,
> > Pawan Darira
> >
>



-- 
Thanks,
Pawan Darira

Mime
View raw message