You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/10/11 18:28:39 UTC

[GitHub] [solr] jeanielamwh commented on a diff in pull request #1067: SOLR-16409: Admin UI - Expose all highlighting parameters in the Query UI

jeanielamwh commented on code in PR #1067:
URL: https://github.com/apache/solr/pull/1067#discussion_r992652919


##########
solr/webapp/web/js/angular/controllers/query.js:
##########
@@ -169,6 +169,9 @@ 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("hl"), $scope.val.hl !== true);
+      purgeParams(params, getDependentFields("hl.tag"), $scope.val["hl.method"] !== "unified" && $scope.val["hl.method"] !== "fastVector");
+      purgeParams(params, getDependentFields("hl.simple"), $scope.val["hl.method"] !== "original");
+      // TODO purge highlighter-implementation-specific params

Review Comment:
   For example, we should purge params for `hl.method=unified` and `original` if the user has `fastVector` selected.
   
   Is it okay to hardcode all the names of the fields-to-be-purged (like in line 169-170) or is there a cleverer way? The list of names will be pretty long.



##########
solr/webapp/web/partials/query.html:
##########
@@ -229,6 +239,184 @@
           hl.highlightMultiTerm
         </label>
 
+        <label for="hl_q">hl.q</label>
+        <input type="text" ng-model="val['hl.q']" name="hl.q" id="hl_q" value="">
+
+        <label for="hl_qparser">hl.qparser</label>
+        <input type="text" ng-model="val['hl.qparser']" name="hl.qparser" id="hl_qparser" value="">
+
+        <label for="hl_snippets">hl.snippets</label>
+        <input type="text" ng-model="val['hl.snippets']" name="hl.snippets" id="hl_snippets" value="">
+
+        <label for="hl_fragsize">hl.fragsize</label>
+        <input type="text" ng-model="val['hl.fragsize']" name="hl.fragsize" id="hl_fragsize" value="">
+
+        <label for="hl_encoder">hl.encoder</label>
+        <input type="text" ng-model="val['hl.encoder']" name="hl.encoder" id="hl_encoder" value="">
+
+        <label for="hl_maxAnalyzedChars">hl.maxAnalyzedChars</label>
+        <input type="text" ng-model="val['hl.maxAnalyzedChars']" name="hl.maxAnalyzedChars" id="hl_maxAnalyzedChars" value="">
+
+        <label for="hl_method" title="Choose hl.method">
+          hl.method
+          <select ng-model="val['hl.method']" name="hl_method" id="hl_method">
+            <option ng-selected="selected" value=''>------</option>
+            <option value="unified">unified</option>
+            <option value="original">original</option>
+            <option value="fastVector">fastVector</option>
+          </select>
+        </label>
+
+        <p class="clearfix"><a ng-click="showAdvanced=!showAdvanced">
+          <span id="add_advanced" ng-class="{open: showAdvanced}">Show advanced</span></a></p>

Review Comment:
   The "Show advanced" expansion does not persist upon refresh (for example when the user execute a query). I think we should persist it otherwise it's pretty annoying to have to click on it every time. But not sure what's the preferred way to do it, should we make the state a param in the url?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org