You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Davis, Daniel (NIH/NLM) [C]" <da...@nih.gov> on 2016/02/05 23:00:40 UTC
CollectionAdminResponse and CollectionAdminRequest.List
So, this makes sense:
CollectionAdminResponse response = new CollectionAdminResponse();
CollectionAdminRequest.Reload request = new CollectionAdminRequest.Reload();
request.setCollectionName(collectionName);
response.setResponse(client.request(request));
But for listing the collections, I'm doing this:
NamedList<Object> response = client.request(new CollectionAdminRequest.List());
System.out.println(config.formatResponse(response));
NamedList<Object> header = (NamedList<Object>) response.get("responseHeader");
assertThat((Integer)header.get("status"), is(equalTo(0)));
List<String> collections = (List<String>) response.get("collections");
Is there a way here to use CollectionAdminResponse that I don't see?
Thanks,
Dan Davis, Systems/Applications Architect (Contractor),
Office of Computer and Communications Systems,
National Library of Medicine, NIH