You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2016/03/30 12:59:10 UTC
lucene-solr:branch_6x: SOLR-8870: AngularJS support for qt style
handlers,
and fix slash encoding bug to support Query panel through proxy (cherry picked
from commit aec11eb)
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x e2d58ccb3 -> f9a4deb7b
SOLR-8870: AngularJS support for qt style handlers, and fix slash encoding bug to support Query panel through proxy
(cherry picked from commit aec11eb)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f9a4deb7
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f9a4deb7
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f9a4deb7
Branch: refs/heads/branch_6x
Commit: f9a4deb7be623e31b6da39955483bb2ca494aae0
Parents: e2d58cc
Author: Jan Høydahl <ja...@apache.org>
Authored: Tue Mar 29 00:31:40 2016 +0200
Committer: Jan Høydahl <ja...@apache.org>
Committed: Wed Mar 30 12:58:44 2016 +0200
----------------------------------------------------------------------
solr/CHANGES.txt | 3 +++
solr/webapp/web/js/angular/controllers/query.js | 9 +++++++--
solr/webapp/web/js/angular/services.js | 4 ++--
3 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f9a4deb7/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 48cacf2..11e2e9e 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -537,6 +537,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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f9a4deb7/solr/webapp/web/js/angular/controllers/query.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/controllers/query.js b/solr/webapp/web/js/angular/controllers/query.js
index 3f0fb27..8e89778 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;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f9a4deb7/solr/webapp/web/js/angular/services.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/services.js b/solr/webapp/web/js/angular/services.js
index 13d01f7..014d36b 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;
}])