UMA*_*WAR 1 solr solrj solrcloud
我正在尝试在solr中禁用configApi,并在博客中阅读了该文章,指出“如果不使用,请通过使用系统属性disable.configEdit = true运行Solr来禁用ConfigAPI。”有人可以解释一下如何实际上我们做到了吗?
您可以在Solr启动文件中设置系统属性。通常有一个名为的参数SOLR_OPTS,您可以在其中添加-Ddisable.configEdit=true。在使用solr启动solr之前,您还应该能够在shell中进行设置export SOLR_OPTS=....。
要保留来自外壳程序的任何值,应SOLR_OPTS="$SOLR_OPTS -Ddisable.configEdit=true"在编辑Solr启动文件时使用。
从与Solr捆绑在一起的示例solr.in.sh中:
# Anything you add to the SOLR_OPTS variable will be included in the java
# start command line as-is, in ADDITION to other options. If you specify the
# -a option on start script, those options will be appended as well. Examples:
#SOLR_OPTS="$SOLR_OPTS -Dsolr.autoSoftCommit.maxTime=3000"
#SOLR_OPTS="$SOLR_OPTS -Dsolr.autoCommit.maxTime=60000"
#SOLR_OPTS="$SOLR_OPTS -Dsolr.clustering.enabled=true"
Run Code Online (Sandbox Code Playgroud)