代码之家  ›  专栏  ›  技术社区  ›  Martin

Apache Solr通过SSL进行分布式搜索

  •  1
  • Martin  · 技术社区  · 11 年前

    根据 Solr documentation 您可以添加“shards”参数用于分布式搜索,语法如下:

    主机:端口/base_url[,主机:端口/base_url]

    如何告诉Solr使用https://?

    1 回复  |  直到 11 年前
        1
  •  3
  •   Martin    10 年前

    因此,答案位于核心的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 .