2016-01-15 27 views

回答

2

Solr的supports adding shards.info在請求得到numFound,得分和檢索結果時所花費的時間爲每個碎片。

至少可以用於手動分片,但也可以嘗試在SolrCloud中隱式分片!

+0

謝謝:)這真的很有用...查詢:http:// localhost:9999/solr/TS/select?q = *%3A *&wt = json&shards.info = true&rows = 0 –

0

我不知道有任何直接選項,您可以在其中進行單個查詢並獲取每個分片的文檔。

您可以使用distrib=false選項來限制將查詢發送到任何其他分片。

您可以對每個分片使用以下查詢。你可以把它在shell腳本爲每個碎片自動化:

http://<host>:<port>/solr/<core>/select?q=*:*&distrib=false 

的單證數量將在NumFound參數。

-2
http://<Any Node IP in solrCloud>:port/solr/collection_name/select?q=*:*&wt=json&indent=true&shards=shard_IP:7070/solr/collection_name 

,您將獲得文檔計數numFound

+0

我在尋找聰明的數字碎片..例如。 shard_1:xxx,shard_2:xxx,shard_3:xxx –