我试图在solr中禁用configApi,我在博客中读到它,声明“如果不使用ConfigAPI,通过运行Solr与系统属性disable.configEdit = true”。可以请一些人解释一下实际上我们这样做?
您在Solr启动文件中设置系统属性。通常有一个名为SOLR_OPTS
的参数,您可以在其中添加-Ddisable.configEdit=true
。在使用export SOLR_OPTS=....
启动solr之前,您还应该能够在shell中设置它。
要保留来自shell的任何值,应在编辑Solr启动文件时使用SOLR_OPTS="$SOLR_OPTS -Ddisable.configEdit=true"
。
从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"