SOLR RSS 数据导入处理程序不起作用



我正在尝试运行 SOLR 5 的 RSS 示例,该示例位于示例 DIH 文件夹的一侧。 当我运行导入命令时使用命令sole -e dih(单击执行按钮)solr只是显示MW导入...没有别的。结果为零文档。

我解决了这个问题。问题只是在xml文件格式中。当我更改我的XML文件和一些配置时,它对我有用。这是我的配置文件。

<dataConfig>
    <dataSource type="URLDataSource" />
    <document>
        <entity name="slashdot"
                pk="link"
                url="http://www.feedforall.com/sample.xml"
                processor="XPathEntityProcessor"
                forEach="/rss/channel/item"
                transformer="DateFormatTransformer">
            <field column="source" xpath="/rss/channel/title" commonField="true" />
            <field column="source-link" xpath="/rss/channel/link" commonField="true" />
            <field column="subject" xpath="/rss/channel/subject" commonField="true" />
            <field column="title" xpath="/rss/channel/item/title" />
            <field column="link" xpath="/rss/channel/item/link" />
            <field column="description" xpath="/rss/channel/item/description" />
            <field column="creator" xpath="/rss/channel/item/creator" />
            <field column="item-subject" xpath="/rss/channel/item/subject" />
            <field column="date" xpath="/rss/channel/item/date" dateTimeFormat="yyyy-MM-dd'T'HH:mm:ss" />
            <field column="slash-department" xpath="/rss/channel/item/department" />
            <field column="slash-section" xpath="/rss/channel/item/section" />
        </entity>
    </document>
</dataConfig>

相关内容

最新更新