根据 Solr documentation您可以使用以下语法为分布式搜索添加“分片”参数:
host:port/base_url[,host:port/base_url]
如何告诉 Solr 使用 https://?
最佳答案
所以答案位于核心的 solrconfig.xml 中:
<shardHandlerFactory class="HttpShardHandlerFactory">
<str name="urlScheme">https://</str>
</shardHandlerFactory>
当您在查询中定义分片时
例如&shards=192.168.0.1:8983/solr/core,192.168.0.2:8983/solr/core
shardHandlerFactory 将为每个服务器添加指定值的前缀
在我们的例子中 https://192.168.0.1:8983/solr/core
和 https://192.168.0.2:8983/solr/core
。
关于java - Apache Solr 通过 SSL 进行分布式搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19515025/