代码之家  ›  专栏  ›  技术社区  ›  Verthosa

Sql server数据导入-创建文档时出错:SolrInputDocument

  •  0
  • Verthosa  · 技术社区  · 8 年前

    索尔。我的想法是导入文件表,但现在我首先要得到它

    data-config.xml

    <dataConfig>   
      <dataSource type="JdbcDataSource"     
         driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
         url="jdbc:sqlserver://localhost;databaseName=inConnexion_Tenant2;integratedSecurity=true" />   
        <document>   
          <entity name="Dashboard" pk="id" query="SELECT Id,PublicId FROM foundation.Shops">   
            <field column="Id" name="Id"/>   
            <field column="PublicId" name="PublicId" /> 
          </entity>   
        </document>   
      </dataConfig>   
    

    schema.xml

    <field name="Id" 
           type="string" indexed="true" stored="true" required="true" multiValued="false" />    
    <field name="PublicId" 
           type="string" indexed="true" stored="true" multiValued="false"/> 
    

    并将uniqueKey条目更改为

    <uniqueKey>Id</uniqueKey> 
    

    当我想导入我的数据时(这只是像Id:5、PublicId: “test”),我在日志中得到以下错误。

    Id=117])

    0 回复  |  直到 8 年前