<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/namepa...@type = 'date']"
/>
</entity>
</entity>
</document>
</dataConfig>
Quoting Ken Stanley <doh...@gmail.com>:
Parinita,
In its simplest form, what does your entity definition for DIH look like;
also, what does one record from your xml look like? We need more information
before we can really be of any help. :)
- Ken
It looked like something resembling white marble, which was
probably what it was: something resembling white marble.
-- Douglas Adams, "The Hitchhikers Guide to the Galaxy"
On Fri, Oct 22, 2010 at 8:00 PM, <pghorp...@ucla.edu> wrote:
Quoting pghorp...@ucla.edu:
Can someone help me please?
I am trying to import mods xml data in solr using the xml/http datasource
This does not work with XPathEntityProcessor of the data import handler
xpath="/mods/name/namepa...@type = 'date']"
I actually have 143 records with type attribute as 'date' for element
namePart.
Thank you
Parinita