简体   繁体   中英

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.

When I import via the Solr admin console it works fine. But when I use the URL ( /solr/coreName/dataimport?command=full-import&clean=true&commit=true ), this is the result I get:

<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).

It's also worth mentioning that I currently have 4 cores in solr, but this issue is only occurring on two of them.

Any ideas on what could be causing this?

EDIT

The issue appears to be resolved if I remove the following from where clause:

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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