You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2009/07/07 02:14:49 UTC
[Solr Wiki] Trivial Update of "DataImportHandler" by JayHill
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 JayHill:
http://wiki.apache.org/solr/DataImportHandler
The comment on the change is:
Example xml for FileListEntityProcessor was missing proper end slash in 3 places
------------------------------------------------------------------------------
<dataConfig>
<dataSource type="FileDataSource" />
<document>
- <entity name="f" processor="FileListEntityProcessor" fileName=".*xml" newerThan="'NOW-3DAYS'" recursive="true" rootEntity="false" dataSource="null">
+ <entity name="f" processor="FileListEntityProcessor" fileName=".*xml" newerThan="'NOW-3DAYS'" recursive="true" rootEntity="false" dataSource="null" />
<entity name="x" processor="XPathEntityProcessor" forEach="/the/record/xpath" url="${f.fileAbsolutePath}">
<field column="full_name" xpath="/field/xpath"/>
</entity>
</entity>
- <document>
+ </document>
- <dataConfig>
+ </dataConfig>
}}}
Do not miss the `rootEntity` attribute. The implicit fields generated by the !FileListEntityProcessor are `fileAbsolutePath, fileSize, fileLastModified, fileName` and these are available for use within the entity X as shown above. It should be noted that !FileListEntityProcessor returns a list of pathnames and that the subsequent entity must use the !FileDataSource to fetch the files content.