问题描述
因此,当我在 Solr Admin 的 RawQueryParameter 中添加分片时,出现以下错误
**error":{
"Metadata":[
"error-class","org.apache.solr.common.solrException","root-error-class","org.apache.solr.common.solrException"],"msg":"HttpShardHandlerFactory shardsWhitelist not configured but required (in lieu of ZkController
and ClusterState) when using the 'shards' parameter. set -Dsolr.disable.shardsWhitelist=true to
disable shards whitelist checks","code":403}}**
我想禁用它但没有发现任何有用的东西 请告诉我如何禁用它
我不想指定像
这样的分片<str name="shardsWhitelist">${solr.shardsWhitelist:localhost:8080/solr/test,localhost:8080/solr/test2}</str>
只想禁用它
解决方法
您可以在启动 solr 时将其添加为参数,如下所示。
-Dsolr.disable.shardsWhitelist=true
另一种选择是您可以添加为
solr.disable.shardsWhitelist=true
到 solr.in.sh
文件,
在路径 "...\solr-VERSION\bin"