SOLR-8870: AngularJS support for qt style handlers, and fix slash encoding bug to support Query panel through proxy

This commit is contained in:
Jan Høydahl 2016-03-29 00:31:40 +02:00
parent 7476d0622f
commit aec11ebcf2
3 changed files with 12 additions and 4 deletions

View File

@ -534,6 +534,9 @@ Bug Fixes
hasn'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 release

View File

@ -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;

View File

@ -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;
}])