How to list SolrCloud aliases?
Asked Answered
C

3

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?

Clavicorn answered 9/7, 2014 at 9:36 Comment(0)
C
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.

Clavicorn answered 9/7, 2014 at 9:36 Comment(0)
M
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.

Milan answered 22/6, 2015 at 19:11 Comment(0)
R
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

Ranique answered 31/5, 2021 at 15:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.