6

In SolrCloud Collections API (https://cwiki.apache.org/confluence/display/solr/Collections+API), we can list collections using action:

/admin/collections?action=LIST

However, aliases are not included in this list. There is also no corresponding command for aliases (we can only CREATEALIAS or DELETEALIAS). How to list aliases?

nuoritoveri
  • 2,494
  • 1
  • 24
  • 28

3 Answers3

8

This feature seems to be not implemented yet: https://issues.apache.org/jira/browse/SOLR-4968

However, you can use this command:

/admin/collections?action=CLUSTERSTATUS

Each collection will be listed together with the aliases it is covered by. Also in the bottom of the XML there is a separate node, summarising all aliases and covered collections.

nuoritoveri
  • 2,494
  • 1
  • 24
  • 28
4

The aliases list can be fetched in json format using the following command.

[solr_server_hostname]:8983/solr/zookeeper?detail=true&path=/aliases.json

The "data" field in this JSON holds the list of collections object.

hari prasad
  • 206
  • 2
  • 7
1

For Solr 6.6+, you could use:

/solr/admin/collections?action=LISTALIASES

See https://solr.apache.org/guide/6_6/collections-api.html#CollectionsAPI-listaliases

Ahmad Abdelghany
  • 11,983
  • 5
  • 41
  • 36