首页 文章

SOLR RSS dataimport处理程序无法正常工作

提问于
浏览
0

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

1 回答

  • 0

    我解决了这个问题 . 问题只是在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>
    

相关问题