lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fergus McMenemie <fer...@twig.me.uk>
Subject Re: Using DIH's special commands....Help needed
Date Thu, 15 Oct 2009 21:26:32 GMT
Hi,

For example, my data-import.conf has the following. It allows me
to specify a parameter "single=pathname" on the url used to
invoke DIH. It allows a doc to be deleted from the index by,
in my case its pathname, which is stored in the field fileAbsolutePath.


  <document>
     <!-- ########################################################### -->
     <entity name="single-delete"
        	 dataSource="null"
        	 processor="XPathEntityProcessor"
        	 url="${dataimporter.request.single}"
        	 rootEntity="true"
        	 flatten="true"
        	 stream="false"
        	 forEach="/record"
        	 transformer="TemplateTransformer">

      <field column="fileAbsolutePath"    template="${dataimporter.request.single}" />

      <field column="$deleteDocByQuery"   template="fileAbsolutePath:${dataimporter.functions.escapeQueryChars(dataimporter.request.single)}"
/> 	       
      <field column="solluckey"           template="${dataimporter.request.single}" />

      </entity>
      </document>

I feel sure this can be optimised!

Fergus.

>On Thu, Oct 15, 2009 at 6:25 PM, William Pierce <evalsinca@hotmail.com>wrote:
>
>> Folks:
>>
>> I see in the DIH wiki that there are special commands which according to
>> the wiki
>>
>> "Special commands can be given to DIH by adding certain variables to the
>> row returned by any of the components . "
>>
>> In my use case,  my db contains rows that are marked "PendingDelete".   How
>> do I use the $deleteDocByQuery special command to delete these rows using
>> DIH?    In other words,  where/how do I specify this?
>>
>>
>The $deleteDocByQuery is for deleting Solr documents by a Solr query and not
>DB rows.
>
>-- 
>Regards,
>Shalin Shekhar Mangar.

-- 

===============================================================
Fergus McMenemie               Email:fergus@twig.me.uk
Techmore Ltd                   Phone:(UK) 07721 376021

Unix/Mac/Intranets             Analyst Programmer
===============================================================

Mime
View raw message