You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ep...@apache.org on 2021/09/03 21:50:17 UTC

[lucene-solr] branch branch_8x updated: Applying PR #278

This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new e6bafcf  Applying PR #278
e6bafcf is described below

commit e6bafcf61aa9e34b59b127fa19b9d3c8ffefeff4
Author: epugh@opensourceconnections.com <>
AuthorDate: Fri Sep 3 17:50:01 2021 -0400

    Applying PR #278
---
 solr/CHANGES.txt                                | 2 ++
 solr/webapp/web/js/angular/controllers/query.js | 2 +-
 solr/webapp/web/partials/query.html             | 6 +++---
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 69bb191..ef81f95 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -60,6 +60,8 @@ Improvements
 
 * SOLR-15610: log4j-layout-template-json is now included in solr server, allowing JSON formatted logs to be configurable. (hossman)
 
+* SOLR-15607: Explicitly indent results in Admin Query UI by default (Olvia Falk via Eric Pugh)
+
 Optimizations
 ---------------------
 * SOLR-15433: Replace transient core cache LRU by Caffeine cache. (Bruno Roustant)
diff --git a/solr/webapp/web/js/angular/controllers/query.js b/solr/webapp/web/js/angular/controllers/query.js
index a1e8a38..86958c8 100644
--- a/solr/webapp/web/js/angular/controllers/query.js
+++ b/solr/webapp/web/js/angular/controllers/query.js
@@ -25,6 +25,7 @@ solrAdminApp.controller('QueryController',
     $scope.val['q'] = "*:*";
     $scope.val['q.op'] = "OR";
     $scope.val['defType'] = "";
+    $scope.val['indent'] = true;
 
     // get list of ng-models that have a form element
     function setModels(argTagName){
@@ -134,7 +135,6 @@ solrAdminApp.controller('QueryController',
 
       purgeParams(params, ["q.alt", "qf", "mm", "pf", "ps", "qs", "tie", "bq", "bf"], $scope.val.defType !== "dismax" && $scope.val.defType !== "edismax");
       purgeParams(params, ["uf", "pf2", "pf3", "ps2", "ps3", "boost", "stopwords", "lowercaseOperators"], $scope.val.defType !== "edismax");
-      purgeParams(params, getDependentFields("indent"), $scope.val.indent !== false);
       purgeParams(params, getDependentFields("hl"), $scope.val.hl !== true);
       purgeParams(params, getDependentFields("facet"), $scope.val.facet !== true);
       purgeParams(params, getDependentFields("spatial"), $scope.val.spatial !== true);
diff --git a/solr/webapp/web/partials/query.html b/solr/webapp/web/partials/query.html
index 4c59865..571fe70 100644
--- a/solr/webapp/web/partials/query.html
+++ b/solr/webapp/web/partials/query.html
@@ -90,9 +90,9 @@ limitations under the License.
           <option>csv</option>
         </select>
 
-        <label for="indent" class="checkbox" title="Do not indent results.">
-          <input type="checkbox" ng-model="val['indent']" name="indent" id="indent" title="Do not indent results." ng-true-value="false" ng-false-value="true">
-          indent off
+        <label for="indent" class="checkbox" title="Enable indenting of results.">
+          <input type="checkbox" ng-model="val['indent']" name="indent" id="indent" title="Enable indenting of results." ng-true-value="true" ng-false-value="false">
+          indent on
         </label>
 
         </div>