Version: apache-solr-3.5.0

For full imports, you can set a url param clean=false.

However, can 'clean' be set to 'false' as a default, somewhere like the XML configs, or something?

If not, can full imports be disabled in any way?

Thanks!

有帮助吗?

解决方案

You can configure the clean default value within your solrconfig.xml, in the DataImportHandler section like this:

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

Have a look here: 'invariants' means that you cannot change it later, while defaults is just a default that you can overwrite at request time.

I don't think you can disable the full-import since that's a command, not just a parameter.

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