I need to import several databases and rss sources using DIH.

Is there any possibility to use more than one data-config.xml? Or even if using only one, is there any way to configure different import handlers?

Thanks.

有帮助吗?

解决方案

You can create multiple datasources in any DIH config.

If that doesn't cut it, you can create multiple request handlers in solrconfig.xml. One of the parameter of the handler configuration is "config" which defines the xml. So you could have --

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

and ...

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top