Apache Solr open-source search software
SOLR-8870: AngularJS support for qt style handlers, and fix slash encoding bug to support Query panel through proxy
Jan Høydahlaec11ebcf245
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex ea0aa8a94ce..61344276d2f 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -534,6 +534,9 @@ Bug Fixeshasn't refreshed yet). In this case the reported size of the file is -1.(Shai Erera, Alexey Serba, Richard Coggins)+* SOLR-8870: AngularJS Query tab no longer URL-encodes the /select part of the request, fixing possible 404 issue+ when Solr is behind a proxy. Also, now supports old-style &qt param when handler not prefixed with "/" (janhoy)+======================= 5.5.0 =======================Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this releasediff --git a/solr/webapp/web/js/angular/controllers/query.js b/solr/webapp/web/js/angular/controllers/query.jsindex 3f0fb27b47a..8e89778acd1 100644--- a/solr/webapp/web/js/angular/controllers/query.js+++ b/solr/webapp/web/js/angular/controllers/query.js@@ -67,14 +67,19 @@ solrAdminApp.controller('QueryController',}}- var qt = $scope.qt ? $scope.qt : "select";+ var qt = $scope.qt ? $scope.qt : "/select";for (var filter in $scope.filters) {copy(params, $scope.filters[filter]);}params.core = $routeParams.core;- params.handler = qt;+ if (qt[0] == '/') {+ params.handler = qt.substring(1);+ } else { // Support legacy style handleSelect=true configs+ params.handler = "select";+ set("qt", qt);+ }var url = Query.url(params);Query.query(params, function(data) {$scope.lang = $scope.query.wt;diff --git a/solr/webapp/web/js/angular/services.js b/solr/webapp/web/js/angular/services.jsindex 13d01f7204c..014d36ba525 100644--- a/solr/webapp/web/js/angular/services.js+++ b/solr/webapp/web/js/angular/services.js@@ -212,7 +212,7 @@ solrAdminServices.factory('System',}]).factory('Query',['$resource', function($resource) {- var resource = $resource('/solr/:core:handler', {core: '@core', handler: '@handler', '_':Date.now()}, {+ var resource = $resource('/solr/:core/:handler', {core: '@core', handler: '@handler', '_':Date.now()}, {"query": {method: "GET",transformResponse: function (data) {@@ -230,7 +230,7 @@ solrAdminServices.factory('System',}}}- return "/solr/" + params.core + params.handler + "?" + qs.sort().join("&");+ return "/solr/" + params.core + "/" + params.handler + "?" + qs.sort().join("&");}return resource;}])