I found the error. The <uniqueKey> definition in schema.xml was not set to
the primary key field/column as returned by the deletedPkQuery.

Jorg

On Wed, Feb 17, 2010 at 11:38 AM, Jorg Heymans <jorg.heym...@gmail.com>wrote:

> Looking closer at the documentation, it appears that expungeDeletes in fact
> has nothing to do with 'removing deleted documents from the index' as i
> thought before:
>
>
> http://wiki.apache.org/solr/UpdateXmlMessages#Optional_attributes_for_.22commit.22_and_.22optimize.22
>
>
> expungeDeletes = "true" | "false" — default is false — merge segments with
> deletes away.
>
> Is this correct ?
>
> FWIW I worked around the issue by adding a removed flag to my data and
> sending  <delete> and <commit> commands after delta import but it would have
> been so much nicer to be able to do this all from DIH.
>
> Has anybody been able to get deletedPkQuery to work for deleting documents
> during delta import ?
>
> Jorg
>
> On Tue, Feb 16, 2010 at 3:57 PM, Jorg Heymans <jorg.heym...@gmail.com>wrote:
>
>> Hi,
>>
>> Can anybody tell me if [1] still applies as of version trunk 03/02/2010 ?
>> I am removing documents from my index using deletedPkQuery and a
>> deltaimport. I can tell from the logs that the removal seems to be working:
>>
>> 16-Feb-2010 15:32:54 org.apache.solr.handler.dataimport.DocBuilder
>> collectDelta
>> INFO: Completed parentDeltaQuery for Entity: attachment
>> 16-Feb-2010 15:32:54 org.apache.solr.handler.dataimport.DocBuilder
>> deleteAll
>> INFO: Deleting stale documents
>> 16-Feb-2010 15:32:54 org.apache.solr.handler.dataimport.SolrWriter
>> deleteDoc
>> INFO: Deleting document: 33053
>> 16-Feb-2010 15:32:54 org.apache.solr.core.SolrDeletionPolicy onInit
>> INFO: SolrDeletionPolicy.onInit: commits:num=1
>>
>>  
>> commit{dir=D:\lib\apache-solr-1.5-dev\example\solr\project\data\index,segFN=segments_1y,version=1265210107838,generation=70,filenames=[_2v.prx,
>> _2v.fnm, _2v.tis, _2v.fdt, _2v.frq, segments_1y, _2v.fdx, _2v.tii]
>> 16-Feb-2010 15:32:54 org.apache.solr.core.SolrDeletionPolicy updateCommits
>> INFO: newest commit = 1265210107838
>> 16-Feb-2010 15:32:54 org.apache.solr.handler.dataimport.DocBuilder doDelta
>> INFO: Delta Import completed successfully
>> 16-Feb-2010 15:32:54 org.apache.solr.handler.dataimport.DocBuilder finish
>> INFO: Import completed successfully
>> 16-Feb-2010 15:32:54 org.apache.solr.update.DirectUpdateHandler2 commit
>> INFO: start
>> commit(optimize=true,waitFlush=false,waitSearcher=true,expungeDeletes=false)
>> 16-Feb-2010 15:32:54 org.apache.solr.search.SolrIndexSearcher <init>
>> INFO: Opening searc...@182c2d9 main
>> 16-Feb-2010 15:32:54 org.apache.solr.update.DirectUpdateHandler2 commit
>> INFO: end_commit_flush
>>
>> However when i search the index the removed data is still present,
>> presumably because the DirectUpdateHandler2 does not automatically do
>> expungeDeletes ? Can i configure this somewhere in solrconfig.xml (SOLR-1275
>> was not very clear exactly what needs to be done to activate this behaviour)
>> ?
>>
>> Thanks
>> Jorg
>>
>> [1] http://marc.info/?l=solr-user&m=125962049425151&w=2
>>
>
>

Reply via email to