lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com>
Subject Re: DIH. behavior after a import. Log, delete table !?
Date Mon, 17 May 2010 11:56:42 GMT

> hm i think i can use "deletedPkQuery" but it dont works for
> me, but maybe you
> can help me. here is my conifg.
> 
>  <entity name="item" pk="id"
> transformer="script:BoostDoc"
>   query="select i.id, i.shop_id, i.is_active, i.shop
> ... 
> 
>   deltaImportQuery="select i.id, i.s ...WHERE
> ...  AND
> i.id='${dataimporter.delta.update_id}
> 
>   deltaQuery=    "SELECT update_id FROM
> solr_imports" 
> 
>   deletedPkQuery ="DELETE FROM solr_imports
> WHERE   
> solr_imports.update_id='${dataimporter.item.update_id}'
> ">
> 
> 
> so, i only want to delete these ID'S which are updatet.
> this is my
> exception:
> SCHWERWIEGEND: Delta Import Failed
> org.apache.solr.handler.dataimport.DataImportHandlerException:
> Unable to
> execute query: DELETE FROM solr_imports WHERE
> solr_imports.update_id='' 
> Processing Document # 1
> 
> 
> so the deletedPkQuery  get no ID's =(

I am not sure what will happen with this kind of deletedPkQuery. Probably you won't be able
to use ${dataimporter.delta.update_id} variable. But i am also curios what will happen. can
you try this:

deletedPkQuery ="DELETE FROM solr_imports WHERE   
solr_imports.update_id='${dataimporter.delta.update_id}'

Since your deltaQuery does not contain WHERE clause, why not delete (with another program
or script) solr_imports table after delta-import?


      

Mime
View raw message