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/02/04 13:04:31 UTC

[GitHub] [solr] betulince opened a new pull request #594: Solr paramset impl

betulince opened a new pull request #594:
URL: https://github.com/apache/solr/pull/594


   https://issues.apache.org/jira/browse/SOLR-15853
   
   # Description
   
   A screen where paramset can be created has been added to the admin tool. You can set a new paramset on this screen and bring this paramset. When the get paramset button is pressed, you can see all the paramsets that this collection has. You can only display it by typing a paramset whose name you know in the input field.
   
   In addition, a new section has been added to the query screen, enabling the use of the paramset desired to be used in this field. Multiple selection is also possible here. If you select the paramsets you want to use and say execute query, you will see that this paramset is added to the url as useParam=paramset_name and returns the correct results.
   I applied the films example in this [link](https://github.com/apache/solr/tree/main/solr/example/films) to test it, it gave the expected results. 
   
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request title.
   - [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


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


[GitHub] [solr] betulince commented on pull request #594: SOLR-15853 Solr paramset impl

Posted by GitBox <gi...@apache.org>.
betulince commented on pull request #594:
URL: https://github.com/apache/solr/pull/594#issuecomment-1030255616


   Of course, I think it would be useful to ask on the dev list and get
   everyone's opinion to find the most suitable name.
   Also, we can change the icon too :-)
   
   Eric Pugh ***@***.***>, 4 Şub 2022 Cum, 17:34 tarihinde şunu
   yazdı:
   
   > This is Super Exciting! I am going to go through and test this, but
   > probably not till Monday.
   >
   > One thing is, I wonder, now that we are exposing this in the UI, I wonder
   > if the best name is ParamSets? I am going to start a thread on the Dev list
   > about the name of this feature. It may amount to some bikeshedding, or now
   > may be the time to come up with a better name to describe configuring a
   > Solr end point.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/solr/pull/594#issuecomment-1030043563>, or
   > unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AKSKE2HL4EK7RHB6ZCRQSCDUZPPWHANCNFSM5NRXL3UQ>
   > .
   > Triage notifications on the go with GitHub Mobile for iOS
   > <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
   > or Android
   > <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
   >
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


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


[GitHub] [solr] epugh edited a comment on pull request #594: SOLR-15853 Solr paramset impl

Posted by GitBox <gi...@apache.org>.
epugh edited a comment on pull request #594:
URL: https://github.com/apache/solr/pull/594#issuecomment-1030043563


   This is Super Exciting!    I am going to go through and test this, but probably not till Monday.   
   
   One thing is, I wonder, now that we are exposing this in the UI, I wonder if the best name is ParamSets?    I am going to start a thread on the Dev list about the name of this feature.   It may amount to some bikeshedding, or now may be the time to come up with a better name to describe configuring a Solr end point.     If you are not on the dev list, you might want to join @betulince  


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


[GitHub] [solr] ackepenek commented on a change in pull request #594: SOLR-15853 Solr paramset impl

Posted by GitBox <gi...@apache.org>.
ackepenek commented on a change in pull request #594:
URL: https://github.com/apache/solr/pull/594#discussion_r799464952



##########
File path: solr/webapp/web/partials/query.html
##########
@@ -23,6 +23,18 @@
       </label>
       <input type="text" ng-model="qt" id="qt" placeholder="/select" value="/select" title="Request handler in solrconfig.xml.">
 
+      <div>
+        <label for="choose_paramset">Choose Paramset to Apply</label>
+        <select id="choose_paramset"
+                style="width:100%"
+                chosen

Review comment:
       I think you don't need to add `chosen` attribute in to select tag




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


[GitHub] [solr] betulince commented on pull request #594: Solr paramset impl

Posted by GitBox <gi...@apache.org>.
betulince commented on pull request #594:
URL: https://github.com/apache/solr/pull/594#issuecomment-1029972852


   You can also check this newly added feature from the screenshots I have added.
   
   ![Screenshot from 2022-02-04 16-08-15](https://user-images.githubusercontent.com/44343912/152534495-6a080890-da3c-499e-9df4-8746c4e34208.png)
   
   ![Screenshot from 2022-02-04 16-05-55](https://user-images.githubusercontent.com/44343912/152534506-2a28527b-eec2-46f1-a52a-aee92a0136e6.png)
   
   ![Screenshot from 2022-02-04 16-06-50](https://user-images.githubusercontent.com/44343912/152534519-3f7c0aff-86d3-4177-8ad4-74430fe133dd.png)
   
   ![Screenshot from 2022-02-04 16-07-47](https://user-images.githubusercontent.com/44343912/152534528-3944b0f1-77ed-46bf-9982-5b26c5607319.png)
   
   ![Screenshot from 2022-02-04 16-08-03](https://user-images.githubusercontent.com/44343912/152534538-c095942e-44f6-4d62-a79b-ce1692770e2d.png)
   
   


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


[GitHub] [solr] epugh commented on pull request #594: SOLR-15853 Solr paramset impl

Posted by GitBox <gi...@apache.org>.
epugh commented on pull request #594:
URL: https://github.com/apache/solr/pull/594#issuecomment-1067219287


   Can't wait to see what you added...   
   
   FYI, over the weekend I needed a better "multiselect", and someone had recommended selectize.js, so I rolled that in as part of this https://github.com/apache/solr/pull/745
   
   It supposedly has drag and drop ordering, though I haven't figured that out!  


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


[GitHub] [solr] epugh commented on pull request #594: SOLR-15853 Solr paramset impl

Posted by GitBox <gi...@apache.org>.
epugh commented on pull request #594:
URL: https://github.com/apache/solr/pull/594#issuecomment-1067226168


   is package.json actually integrated into the build?  I think we've never had one before...


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


[GitHub] [solr] epugh commented on pull request #594: SOLR-15853 Solr paramset impl

Posted by GitBox <gi...@apache.org>.
epugh commented on pull request #594:
URL: https://github.com/apache/solr/pull/594#issuecomment-1067221918


   looks like `angular-ui-select` is also either based or inspired by `selectize.js`!


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


[GitHub] [solr] betulince commented on pull request #594: SOLR-15853 Solr paramset impl

Posted by GitBox <gi...@apache.org>.
betulince commented on pull request #594:
URL: https://github.com/apache/solr/pull/594#issuecomment-1067901395


   Improvement done. It works correctly according to my tests. Instead of copying the placeholder, it made more sense to show a sample json and have it copied...
   On the query screen, you can change the order of paramsets by drag&drop. And it goes directly to the UI with the chosen order. 


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


[GitHub] [solr] ackepenek commented on a change in pull request #594: SOLR-15853 Solr paramset impl

Posted by GitBox <gi...@apache.org>.
ackepenek commented on a change in pull request #594:
URL: https://github.com/apache/solr/pull/594#discussion_r799454017



##########
File path: solr/webapp/web/js/angular/controllers/paramsets.js
##########
@@ -0,0 +1,88 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+//helper for formatting JSON and others
+
+solrAdminApp.controller('ParamSetsController',
+  function($scope, $routeParams, ParamSet, Constants) {
+    $scope.resetMenu("paramsets", Constants.IS_COLLECTION_PAGE);
+
+    $scope.refresh = function () {
+      $scope.commitWithin = 1000;
+      $scope.overwrite = true;
+      $scope.paramsetContent = "";
+      $scope.placeholder = "{\n" +
+        "  \"set\": {\n" +
+        "    \"myQueries\": {\n" +
+        "      \"defType\": \"edismax\",\n" +
+        "      \"rows\": \"5\",\n" +
+        "      \"df\": \"text_all\"\n" +
+        "    }\n" +
+        "  }\n" +
+        "}"
+    };
+
+    $scope.refresh();
+
+

Review comment:
       please remove needless blank lines

##########
File path: solr/webapp/web/js/angular/controllers/query.js
##########
@@ -209,7 +247,7 @@ solrAdminApp.controller('QueryController',
           $location.search(key, adminParams[key]);
         }
         var currentUrl = $location.$$url;
-        if (previousUrl === currentUrl) { //if the query send with same parameters the query should be executed
+        if (previousUrl === currentUrl) { //if the query send with same parameters

Review comment:
       old comment looks better than new one. please return back to old

##########
File path: solr/webapp/web/partials/query.html
##########
@@ -23,6 +23,18 @@
       </label>
       <input type="text" ng-model="qt" id="qt" placeholder="/select" value="/select" title="Request handler in solrconfig.xml.">
 
+      <div>

Review comment:
       I would recommend  that field should be optional. If the core has paramsets then it should be shown. otherwise it should not be shown..
   But it's up to you

##########
File path: solr/webapp/web/partials/paramsets.html
##########
@@ -0,0 +1,75 @@
+<!--
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+-->
+
+<div id="paramsets" class="clearfix">
+    <div id="form">
+        <form>
+            <div id="paramset-name-container">
+                <label for="paramsetName">
+                    <a rel="help">Paramset Name</a>
+                </label>
+                <input ng-model="name" name="paramsetName" id="paramsetName" title="ParamSetName" placeholder="Name">
+            </div>
+
+            <button type="submit" ng-click="getParamsets()" id="get-paramset">Get Paramset</button>
+
+            <fieldset class="Update Paramset">
+                <legend>Update Paramset</legend>
+                <div class="fieldset" id="paramsetContent-container">
+                    <label for="paramset">
+                        <a rel="help">Paramset(s)</a>
+                    </label>
+                    <textarea ng-model="paramsetContent" name="paramsets" id="paramset" title="The Paramset" rows="10"
+                              cols="65" placeholder="{{placeholder}}"></textarea>
+                </div>
+
+                <div id="advanced">
+                    <div id="attribs">
+                        <div id="general-attribs">
+                            <label for="commitWithin">
+                                <a rel="help">Commit Within</a>
+                            </label>
+                            <input type="text" ng-model="commitWithin" id="commitWithin" value="1000" title="Commit Within (ms)">
+                            <label for="overwrite">
+                                <a rel="help">Overwrite</a>
+                            </label>
+                            <input ng-model="overwrite" type="text" id="overwrite" value="true" title="Overwrite">
+                        </div>
+                    </div>
+                </div>
+            </fieldset>
+
+            <button type="submit" ng-click="submit()" id="submit">Submit Paramset</button>
+        </form>
+    </div>
+    <div id="result">
+        <div id="response" ng-show="response">
+            <div>
+                <span class="description">Status: </span>{{ responseStatus }}
+            </div>
+            <div>
+                <span class="description">Response:</span>
+                <pre class="syntax language-json"><code ng-bind-html="response | highlight:'json' | unsafe"></code></pre>
+            </div>
+        </div>
+
+    </div>
+</div>
+
+

Review comment:
       remove unnecessary blank line




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


[GitHub] [solr] epugh commented on pull request #594: SOLR-15853 Solr paramset impl

Posted by GitBox <gi...@apache.org>.
epugh commented on pull request #594:
URL: https://github.com/apache/solr/pull/594#issuecomment-1030043563


   This is Super Exciting!    I am going to go through and test this, but probably not till Monday.   
   
   One thing is, I wonder, now that we are exposing this in the UI, I wonder if the best name is ParamSets?    I am going to start a thread on the Dev list about the name of this feature.   It may amount to some bikeshedding, or now may be the time to come up with a better name to describe configuring a Solr end point.   


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


[GitHub] [solr] betulince commented on pull request #594: SOLR-15853 Solr paramset impl

Posted by GitBox <gi...@apache.org>.
betulince commented on pull request #594:
URL: https://github.com/apache/solr/pull/594#issuecomment-1067420683


   hey! I deleted package.json and package-lock.json. They are not related with the improvement, I just added while I was trying some things :) And I didn't send the improvement on paramset screen yet. I'll send it in some hours, I am just checking and doing final touches. Sorry for late reply it's just 3 am in the morning in turkey :) I am excited for the results!!


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