lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Norskog <goks...@gmail.com>
Subject Re: xpath processing
Date Wed, 27 Oct 2010 07:43:06 GMT
The XPathEntityProcessor does not do full XPath. It is a very limited 
set intended to be very fast.
You can add code in any scripting language, but that is not really 
performant.
Is it possible to use the RegexTransformer to find your records with 
regular expressions?

Ken Stanley wrote:
> On Fri, Oct 22, 2010 at 11:52 PM,<pghorpade@ucla.edu>  wrote:
>
>    
>>
>> <dataConfig>
>> <dataSource name="myfilereader" type="FileDataSource"/>
>> <document>
>> <entity name="f" rootEntity="false" dataSource="null"
>> processor="FileListEntityProcessor" fileName=".*xml" recursive="true"
>> baseDir="C:\data\sample_records\mods\starr">
>> <entity name="x" dataSource="myfilereader" processor="XPathEntityProcessor"
>> url="${f.fileAbsolutePath}" stream="false" forEach="/mods"
>> transformer="DateFormatTransformer,RegexTransformer,TemplateTransformer">
>> <field column="id" template="${f.file}"/>
>> <field column="collectionKey" template="starr"/>
>> <field column="collectionName" template="starr"/>
>> <field column="fileAbsolutePath" template="${f.fileAbsolutePath}"/>
>> <field column="fileName" template="${f.file}"/>
>> <field column="fileSize" template="${f.fileSize}"/>
>> <field column="fileLastModified" template="${f.fileLastModified}"/>
>> <field column="classification_keyword" xpath="/mods/classification"/>
>> <field column="accessCondition_keyword" xpath="/mods/accessCondition"/>
>> <field column="nameNamePart_s" xpath="/mods/name/namePart[@type = 'date']"
>> />
>> </entity>
>> </entity>
>> </document>
>> </dataConfig>
>>      
>
> The documentation says you don't need a dataSource for your
> XPathEntityProcessor entity; in my configuration, I have mine set to the
> name of the top-level FileListEntityProcessor. Everything else looks fine.
> Can you provide one record from your data? Also, are you getting any errors
> in your log?
>
> - Ken
>
>    

Mime
View raw message