You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by md...@apache.org on 2021/04/15 16:06:13 UTC

[solr] branch main updated: SOLR-15153 - Collection selector drop down does not sort collections (#63)

This is an automated email from the ASF dual-hosted git repository.

mdrob pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new a8706b4  SOLR-15153 - Collection selector drop down does not sort collections (#63)
a8706b4 is described below

commit a8706b492be3bdecc4f757e7e1a164dbe1e4bd93
Author: Edward Ribeiro <er...@users.noreply.github.com>
AuthorDate: Thu Apr 15 13:04:40 2021 -0300

    SOLR-15153 - Collection selector drop down does not sort collections (#63)
---
 solr/CHANGES.txt                                                        | 2 ++
 .../core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java | 1 +
 2 files changed, 3 insertions(+)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index e855542..e56a5c4 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -45,6 +45,8 @@ Improvements
 
 * SOLR-14223: PKI Auth can bootstrap from existing key files instead of creating new keys on startup (Mike Drob)
 
+* SOLR-15153: Collection selector drop down does not sort collections (Edward Ribeiro)
+
 * SOLR-11725: Use corrected sample formula for computing stdDev and variance in JSON aggregations
   (hossman, Munendra S N, yonik)
 
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
index 9e2a18a..1d689d0 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
@@ -916,6 +916,7 @@ public class CollectionsHandler extends RequestHandlerBase implements Permission
       NamedList<Object> results = new NamedList<>();
       Map<String, DocCollection> collections = h.coreContainer.getZkController().getZkStateReader().getClusterState().getCollectionsMap();
       List<String> collectionList = new ArrayList<>(collections.keySet());
+      Collections.sort(collectionList);
       // XXX should we add aliases here?
       results.add("collections", collectionList);
       SolrResponse response = new OverseerSolrResponse(results);