Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change 
notification.

The following page has been changed by FergusMcMenemie:
http://wiki.apache.org/solr/DataImportHandler

The comment on the change is:
improving example to avoid regex oddity

------------------------------------------------------------------------------
           <field column="fileWebPath"     template="${x.fileAbsolutePath}"
                                           
regex="${dataimporter.request.img_installdir}(.*)" replaceWith="$1"/>
  
-          <field column="fileWebDir"      regex="(.*)/.*" replaceWith="$1" 
sourceColName="fileWebPath"/>
+          <field column="fileWebDir"      regex="^(.*)/.*" replaceWith="$1" 
sourceColName="fileWebPath"/>
  
           <field column="imgFilename"     xpath="/mediaBlock/@url" />
           <field column="imgCaption"      xpath="/mediaBlock/caption"  />
           <field column="imgSrcArticle"   xpath="/mediaBlock/source"
                                           
template="${x.fileWebDir}/${x.imgSrcArticle}/"/>
  
-          <field column="uid"             regex="(.*)" 
replaceWith="$1#${x.imgFilename}" sourceColName="fileWebPath"/>
+          <field column="uid"             regex="^(.*)$" 
replaceWith="$1#${x.imgFilename}" sourceColName="fileWebPath"/>
  
           <!-- if imgFilename is not defined all the following will also not 
be defined -->
           <field column="imgWebPathFULL"  
template="${x.fileWebDir}/images/${x.imgFilename}"/>
-          <field column="imgWebPathICON"  regex="(.*)\.\w+$" 
replaceWith="${x.fileWebDir}/images/s$1.png"
+          <field column="imgWebPathICON"  regex="^(.*)\.\w+$" 
replaceWith="${x.fileWebDir}/images/s$1.png"
                                           sourceColName="imgFilename"/>
  
         </entity>

Reply via email to