epugh commented on code in PR #1304:
URL: https://github.com/apache/solr/pull/1304#discussion_r1083293202


##########
solr/webapp/web/js/angular/controllers/analysis.js:
##########
@@ -21,33 +21,64 @@ solrAdminApp.controller('AnalysisController',
 
       $scope.refresh = function() {
         Luke.schema({core: $routeParams.core}, function(data) {
-          $scope.fieldsAndTypes = [];
-          for (var field in data.schema.fields) {
-            $scope.fieldsAndTypes.push({
-              group: "Fields",
-              value: "fieldname=" + field,
-              label: field});
-          }
-          for (var type in data.schema.types) {
-            $scope.fieldsAndTypes.push({
-              group: "Types",
-              value: "fieldtype=" + type,
-              label: type});
-          }
+          $scope.fieldsAndTypes = getFieldsAndTypes(data.schema);
           $scope.core = $routeParams.core;
+          $scope.parseQueryString(data.schema);
+          // @todo - set defaultSearchField either to 
context["analysis.fieldname"] or context["analysis.fieldtype"]
         });
+      };
+      $scope.verbose = true;
 
-        $scope.parseQueryString();
-        // @todo - set defaultSearchField either to 
context["analysis.fieldname"] or context["analysis.fieldtype"]
+      var getFieldsAndTypes = function(schema) {
+        var aggregatedFields = schema.fields;
+        for (var field in schema.fields) {
+          var copy_dests = schema.fields[field].copyDests;
+          for (var i in copy_dests) {
+            var copy_dest = copy_dests[i];
+            if (!aggregatedFields[copy_dest]) {
+              aggregatedFields[copy_dest] = {};
+            }
+          }
+        }
 
+        var fieldsAndTypes = [];
+        var fields = Object.keys(aggregatedFields).sort();
+        for (var i in fields) {
+          fieldsAndTypes.push({
+            group: "Fields",
+            value: "fieldname=" + fields[i],
+            label: fields[i]
+          });
+        }
+        var dynamic_fields = Object.keys(schema.dynamicFields).sort();

Review Comment:
   camelCase



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to