简体   繁体   English

Solr完全导入可在管理控制台中使用,但不能通过URL

[英]Solr full-import works in admin console, but not via URL

I'm having trouble importing data from an Oracle DB into my Solr cores. 我无法将数据从Oracle DB导入Solr内核。

When I import via the Solr admin console it works fine. 当我通过Solr管理控制台导入时,效果很好。 But when I use the URL ( /solr/coreName/dataimport?command=full-import&clean=true&commit=true ), this is the result I get: 但是当我使用URL( /solr/coreName/dataimport?command=full-import&clean=true&commit=true )时,这是我得到的结果:

<response>
    <lst name="responseHeader">
        <int name="status">0</int>
        <int name="QTime">14</int>
    </lst>
    <lst name="initArgs">
        <lst name="defaults">
            <str name="config">./DIHconfig.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">2</str>
        <str name="Total Rows Fetched">0</str>
        <str name="Total Documents Processed">0</str>
        <str name="Total Documents Skipped">0</str>
        <str name="Full Dump Started">2017-06-29 14:44:35</str>
        <str name="">
            Indexing completed. Added/Updated: 0 documents. Deleted 0 documents.
        </str>
        <str name="Committed">2017-06-29 14:44:38</str>
        <str name="Time taken">0:0:8.564</str>
    </lst>
</response>

Note that the result is successful, it's just not finding any rows (but again, when I index via the GUI it works fine). 请注意,结果是成功的,只是没有找到任何行(但是同样,当我通过GUI进行索引时,它可以正常工作)。

It's also worth mentioning that I currently have 4 cores in solr, but this issue is only occurring on two of them. 还值得一提的是,我目前在solr中有4个内核,但是这个问题仅发生在其中的两个上。

Any ideas on what could be causing this? 关于什么可能导致此的任何想法?

EDIT 编辑

The issue appears to be resolved if I remove the following from where clause: 如果我从where子句中删除以下内容,则该问题似乎已解决:

SELECT 
...
FROM 
...
WHERE '${dataimporter.request.clean}' != 'false'
...  

Why does this evaluate to false when I import using the URL, but true when I use the admin console? 为什么在使用URL导入时,此结果为false,而在使用管理控制台时,其结果为true?

也许您需要在Oracle服务器和Solr之间建立连接器,看看它: https : //docs.oracle.com/cd/E55659_01/doc.31/e55984/oxh_ref006.htm#BDCUG860

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM