0

在我的 db-data-config.xml 中,我配置了两个数据源,每个数据源都有他的参数名称,例如:

<dataSource name="test1"
     type="JdbcDataSource"
     driver="com.mysql.jdbc.Driver"
     url="jdbc:mysql://localhost/firstdb"
     user="username1"
     password="psw1"/>

<dataSource name="test2"
     type="JdbcDataSource"
     driver="com.mysql.jdbc.Driver"
     url="jdbc:mysql://localhost/seconddb"
     user="username2"
     password="psw2"/>

<document name="content">
        <entity name="news" datasource="test1" query="select...">
        <field column="OTYPE_ID" name="otypeID" />
            <field column="NWS_ID" name="cntID" />
            ....
        </entity>

        <entity name="news_update" datasource="test2" query="select...">
        <field column="OTYPE_ID" name="otypeID" />
            <field column="NWS_ID" name="cntID" />
            ....
        </entity>
</document>
</dataConfig>

但是当我在数据导入的 solr 中执行第二个实体名称查询时,它会启动一个异常:

"表 'firstdb.secondTable' 不存在\n\tat " 有人可以帮我吗?先感谢您

4

2 回答 2

0

我很确定这个问题出现在 solr-user 邮件列表中。那里给出的答案是您在实体标签中使用数据源而不是数据源。它区分大小写。如果我没记错线程,更改它可以解决您的问题。

于 2013-08-08T19:21:09.357 回答
0

A 认为您对 news_update 的查询是错误的。您的表名一定有错误。

于 2013-08-01T09:42:47.983 回答