gpt4 book ai didi

solr - Total Documents Processed = 0 尽管 Total Rows Fetched 在 Oracle 数据库中使用 Solr 不为零

转载 作者:行者123 更新时间:2023-12-04 00:46:42 25 4
gpt4 key购买 nike

我正在使用 dataImportHandler 将数据从 Oracle 数据库导入 solr。尽管导入和索引编制成功,但由于未创建文档,我无法搜索。日志中也没有错误。这是我的配置文件片段。请帮忙。

<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> 
<lst name="defaults">
<str name="config">data-config.xml</str>
</lst>
</requestHandler>

架构.xml

<types>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
</types>
<fields>
<field name="eid" type="string" indexed="true" stored="true" required="true" />
<field name="nm" type="string" indexed="true" stored="true" required="true" />
</fields>
<uniqueKey>eid</uniqueKey>
<defaultSearchField>nm</defaultSearchField>
<solrQueryParser defaultOperator="OR"/>

数据配置.xml

<dataConfig>  url="jdbc:oracle:thin:@//abc"  user="abc"  password="abc" />
<document name="client">
<entity name="org" query="select org.code ,org.name from abc org where org_name like 'BB%'">
<field column="code" name="eid"/>
<field column="name" name="nm" />
</entity>
</document>
</dataConfig>

数据导入状态:

<str name="Total Rows Fetched">64</str>
<str name="Total Documents Processed">0</str>

最佳答案

在 Solr 管理控制台上调试的一些方法(即 http://[yourhost]:8983/solr/index.html#/ ):

  1. 在数据导入 ( http://[yourhost]:8983/solr/index.html#/dataimport/ ) 上,检查 “Total Documents Failed” 的“Raw Status-Output”:

      "statusMessages": {
    "Total Requests made to DataSource": "1",
    "Total Rows Fetched": "12966",
    "Total Documents Processed": "0",
    "Total Documents Skipped": "0",
    "Full Dump Started": "2016-08-08 11:15:18",
    "": "Indexing completed. Added/Updated: 0 documents. Deleted 0 documents.",
    "Committed": "2016-08-08 11:15:20",
    **"Total Documents Failed": "12966"**,
    "Time taken": "0:0:2.452"
    }
  2. 在管理控制台上,转到“日志记录” 页面 ( http://[yourhost]:8983/solr/index.html#/~logging ) 查看错误日志。

关于solr - Total Documents Processed = 0 尽管 Total Rows Fetched 在 Oracle 数据库中使用 Solr 不为零,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8616545/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com