SolrCloud分布式检索时忽略宕机的Shard

“<lst name=”error”>
<str name=”msg”>no servers hosting shard:</str>
<int name=”code”>503</int>
</lst>”

加入下面参数,只从存活的shards获取数据:

shards.tolerant=true

例如:

<requestHandler name=”/select” class=”solr.SearchHandler”>
<lst name=”defaults”>
<str name=”echoParams”>explicit</str>
<str name=”shards.tolerant”>true</str>
<int name=”rows”>10</int>
<str name=”df”>text</str>
</lst>
</requestHandler>

没有打此参数,如果集群内有挂掉的shard,将显示:

no servers hosting shard


本文转载自:http://www.solr.cc/blog/?p=44

反馈