我正在将数据从 MySql 索引到 Solr 。以下是我在此命令后收到的响应 XML:localhost:8080/solr/dataimport?command=full-import&flush=true
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">5</int></lst>
<lst name="initArgs"><lst name="defaults">
<str name="config">data-config.xml</str></lst></lst>
<str name="command">full-import</str><str name="status">idle</str>
<str name="importResponse"/>
<lst name="statusMessages"><str name="Total Requests made to DataSource">1</str>
<str name="Total Rows Fetched">2599</str>
<str name="Total Documents Skipped">0</str>
<str name="Full Dump Started">2012-12-04 11:51:45</str>
<str name="">Indexing completed. Added/Updated: 0 documents. Deleted 0 documents.</str>
<str name="Committed">2012-12-04 11:51:46</str><str name="Total Documents Processed">0</str>
<str name="Time taken">0:0:1.112</str></lst
><str name="WARNING">This response format is experimental. It is likely to change in the future.</str></response>
索引应该在数据目录下的索引目录中吗?我尝试通过 Luke GUI 查看它,它没有显示任何内容,我什至可以在这里正确创建索引吗?(My Sql 查询只返回一列,字段类型已在 schema.xml 中定义)
这是我的 data-config.xml :
<dataConfig>
<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/mydb" user="root" password="123"/>
<document>
<entity name="procname" query="Select ap.procname from cur_aprocedures ap
left join test_data ts on ts.procid = ap.procid">
<field column="procname" name="procname" />
</entity>