我有 mdb 数据库文件,我尝试将它导入到 Solr。数据库文件有超过 6000 条记录,但它在 Solr 中仅索引 10 条记录:
索引完成。添加/更新:10 个文件。删除了 0 个文档。(时长:03s)
日志输出只是警告:
9/26/2014 4:36:52 PM
WARN
ManagedResource
No stored data found for /rest/managed
9/26/2014 4:36:52 PM
WARN
ManagedResource
No stored data found for /rest/managed
9/26/2014 4:36:52 PM
WARN
ManagedResource
No registered observers for /rest/managed
9/26/2014 4:36:52 PM
WARN
ManagedResource
No registered observers for /rest/managed
9/26/2014 4:37:07 PM
WARN
Index
unsupported collating sort order SortOrder[1025(0)] for text index, making read-only
9/26/2014 4:37:08 PM
WARN
Index
unsupported collating sort order SortOrder[1025(0)] for text index, making read-only
9/26/2014 4:37:10 PM
WARN
Index
unsupported data type BINARY for index, making read-only
我在 solrconfig.xml 中使用以下内容:
<requestHandler name="/dataimport" class="solr.DataImportHandler">
<lst name="defaults">
<str name="config">C:\solr-4.9.0\example\solr\fox\conf\data-config.xml</str>
</lst>
</requestHandler>
这在 data-config.xml 中:
<?xml version="1.0" encoding="UTF-8" ?>
<dataConfig>
<dataSource driver="net.ucanaccess.jdbc.UcanaccessDriver" type="JdbcDataSource" url="jdbc:ucanaccess://C:/feqh/main.mdb;memory=false" />
<document>
<entity name="Book"
query="select bkid AS id, bkid AS BookID,bk AS BookTitle from 0bok">
<field column="id" name="id"/>
<field column="BookID" name="BookID"/>
<field column="BookTitle" name="BookTitle"/>
</entity>
</document>
</dataConfig>
我使用 UCanAccess 驱动程序,因为我有 Java8 并且不支持 jdbc-odbc 驱动程序(sun.jdbc.odbc.JdbcOdbcDriver)我认为这可能是由于内存限制,所以我设置memory=false
让它写在磁盘上。有什么解决方案或建议吗?