lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ankit Jain <ankitjainc...@gmail.com>
Subject Get list of collection
Date Tue, 02 Dec 2014 08:27:29 GMT
Hi All,

I have a requirement to get the list of *collection* available in Solr. we
are using solrj library.

I am able to fetch the list of cores but not getting ways to fetch the list
of collections.

Below is the sample example, that i am using to fetch the cores:

        CoreAdminRequest request = new CoreAdminRequest();
        request.setAction(CoreAdminAction.STATUS);
        CoreAdminResponse cores = request.process(server);

        // List of the cores
        List<String> coreList = new ArrayList<String>();
        for (int i = 0; i < cores.getCoreStatus().size(); i++) {
            coreList.add(cores.getCoreStatus().getName(i));
        }

Please help.

-- 
Thanks,
Ankit Jain

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message