【Solr日常运维命令】

示例中的collection索引名为solr

获得所有/某个collection的core总数及列表

https://189.39.172.237:20026/Solr/SolrServerAdmin/37/solr/admin/collections?action=CLUSTERSTATUS
https://189.39.172.237:20026/Solr/SolrServerAdmin/37/solr/admin/collections?action=CLUSTERSTATUS&collection=solr

获得某个实例上的所有core/某个core的状态信息

https://189.39.172.237:20026/Solr/SolrServerAdmin/37/solr/admin/cores?action=STATUS
https://189.39.172.237:20026/Solr/SolrServerAdmin/37/solr/admin/cores?action=STATUS&core=solr_shard2_replica1
https://189.39.172.237:20026/Solr/SolrServerAdmin/38/solr/admin/cores?action=STATUS&core=solr_shard1_replica1

获得Solr的所有collection总数及列表

https://189.39.172.237:20026/Solr/SolrServerAdmin/37/solr/shardmonitor?&action=LIST&wt=json

返回某个collection的总文档数

https://189.39.172.237:20026/Solr/SolrServerAdmin/37/solr/solr/select?q=:&rows=0
https://189.39.172.237:20026/Solr/SolrServerAdmin/37/solr/solr_shard1_replica1/admin/luke?numTerms=0&show=index

返回某个collection在某个SolrServer实例的索引总文档数(distrib=false)

https://189.39.172.237:20026/Solr/SolrServerAdmin/37/solr/collection1/select?q=:&rows=0&distrib=false
https://189.39.172.237:20026/Solr/SolrServerAdmin/38/solr/collection1/select?q=:&rows=0&distrib=false

返回单core上的索引总数,需指定core名称,比如collection2_shard1_replica2或collection1_shard2_replica1

https://189.39.172.237:20026/Solr/SolrServerAdmin/37/solr/solr_shard1_replica1/admin/luke?numTerms=0&show=index
https://189.39.172.237:20026/Solr/SolrServerAdmin/38/solr/solr_shard2_replica1/admin/luke?numTerms=0&show=index

Reference

http://lucene.apache.org/solr/guide/6_6/coreadmin-api.html
https://www.w3cschool.cn/solr_doc/solr_doc-kn742j6c.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章