我想獲得碎片數量以及solrcloud中每個碎片中的文檔數量,是否有任何直接命令來獲取這些統計數據?
如何在solrcloud中通過智能碎片獲取文檔數量?
截至目前,我從每個節點的用戶界面拉這些統計數據,這需要很長時間。我正在使用solcloud5.2。
我想獲得碎片數量以及solrcloud中每個碎片中的文檔數量,是否有任何直接命令來獲取這些統計數據?
如何在solrcloud中通過智能碎片獲取文檔數量?
截至目前,我從每個節點的用戶界面拉這些統計數據,這需要很長時間。我正在使用solcloud5.2。
Solr的supports adding shards.info
在請求得到numFound,得分和檢索結果時所花費的時間爲每個碎片。
至少可以用於手動分片,但也可以嘗試在SolrCloud中隱式分片!
我不知道有任何直接選項,您可以在其中進行單個查詢並獲取每個分片的文檔。
您可以使用distrib=false
選項來限制將查詢發送到任何其他分片。
您可以對每個分片使用以下查詢。你可以把它在shell腳本爲每個碎片自動化:
http://<host>:<port>/solr/<core>/select?q=*:*&distrib=false
的單證數量將在NumFound
參數。
http://<Any Node IP in solrCloud>:port/solr/collection_name/select?q=*:*&wt=json&indent=true&shards=shard_IP:7070/solr/collection_name
,您將獲得文檔計數numFound
我在尋找聰明的數字碎片..例如。 shard_1:xxx,shard_2:xxx,shard_3:xxx –
謝謝:)這真的很有用...查詢:http:// localhost:9999/solr/TS/select?q = *%3A *&wt = json&shards.info = true&rows = 0 –