1
    <dataConfig> 
    <dataSource type="JdbcDataSource" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://Yor Ip Address:port;databaseName=TEST" user="username" password="password" /> <document> <entity name="UserData" query="select id, firstName,lastName,password from UserData"> 
<document>
 <entity name="UserData" query="select id, firstName,lastName,password from UserData">
    <field column="id" name="id" /> 
    <field column="firstName" name="firstName" /> 
    <field column="lastName" name="lastName" /> 
    <field column="password" name="password" /> 
    </entity> </document> </dataConfig>


 this is my Solr Config file for connectionf ms sql with solr when i call dataimport to solr then give me error. can u help me this is correct or not?
4

1 回答 1

0

您发布的 XML 中有一些错误。存在重复且不完整的文档部分。确保它看起来像这样:

<dataConfig> 
  <dataSource type="JdbcDataSource" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver:localhost:port;databaseName=TEST" user="username" password="password" />
  <document>
    <entity name="UserData" query="select id, firstName,lastName,password from UserData">
      <field column="id" name="id" /> 
      <field column="firstName" name="firstName" /> 
      <field column="lastName" name="lastName" /> 
      <field column="password" name="password" /> 
    </entity>
  </document>
</dataConfig>

你仍然有错误吗?如果是这样,错误消息说明了什么?

于 2012-04-09T15:05:03.617 回答