Solr配置文件。导入数据时给我错误

时间:2012-04-06 13:44:50

标签: tomcat solr

    <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?

1 个答案:

答案 0 :(得分: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>

你还有错误吗?如果是这样,错误消息会说什么?