lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jan...@apache.org
Subject lucene-solr:master: SOLR-8596: Split UIs RAW query params only on first equal sign
Date Thu, 28 Jul 2016 13:55:01 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master bc29a3d7e -> c9935b478


SOLR-8596: Split UIs RAW query params only on first equal sign


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c9935b47
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c9935b47
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c9935b47

Branch: refs/heads/master
Commit: c9935b478839a602616c1c6b76e0d3bb06d8f789
Parents: bc29a3d
Author: Jan Høydahl <janhoy@apache.org>
Authored: Wed Jul 27 10:02:00 2016 +1000
Committer: Jan Høydahl <janhoy@apache.org>
Committed: Thu Jul 28 15:52:43 2016 +0200

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  1 +
 solr/webapp/web/js/angular/controllers/query.js | 10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c9935b47/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index eab3780..a728c8a 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -165,6 +165,7 @@ Bug Fixes
 
 * SOLR-9339: NPE in CloudSolrClient when the response is null (noble)
 
+* SOLR-8596: Web UI doesn't correctly generate queries which include local parameters (Alexandre
Rafalovitch, janhoy)
 
 Optimizations
 ----------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c9935b47/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 8e89778..1695647 100644
--- a/solr/webapp/web/js/angular/controllers/query.js
+++ b/solr/webapp/web/js/angular/controllers/query.js
@@ -61,9 +61,13 @@ solrAdminApp.controller('QueryController',
       if ($scope.rawParams) {
         var rawParams = $scope.rawParams.split(/[&\n]/);
         for (var i in rawParams) {
-            var param = rawParams[i];
-            var parts = param.split("=");
-            set(parts[0], parts[1]);
+          var param = rawParams[i];
+          var equalPos = param.indexOf("=");
+          if (equalPos > -1) {
+            set(param.substring(0, equalPos), param.substring(equalPos+1));
+          } else {
+            set(param, ""); // Use empty value for params without "="
+          }
         }
       }
 


Mime
View raw message