lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ephraim Ofir" <>
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

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

Ephraim Ofir

-----Original Message-----
From: Pawan Darira [] 
Sent: Thursday, August 26, 2010 9:01 AM
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
documents from index?

On Thu, Aug 26, 2010 at 12:03 AM, Erick Erickson

> 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
> 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?
> Erick
> On Tue, Aug 24, 2010 at 8:56 PM, Pawan Darira <
> >wrote:
> > Hi
> >
> > I am using data import handler to build index. How can i delete
> > from my index using DIH.
> >
> > --
> > Thanks,
> > Pawan Darira
> >

Pawan Darira

View raw message