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 2021/11/10 15:40:12 UTC

[GitHub] [solr] epugh opened a new pull request #409: SOLR-15786

epugh opened a new pull request #409:
URL: https://github.com/apache/solr/pull/409


   https://issues.apache.org/jira/browse/SOLR-15786
   # Description
   
   Integrate "films" into the list of example collections via `bin/solr start -e` command.
   
   # Solution
   
   This is a babystep towards potentially shipping Solr with more examples that could demonstrate various features...   I'm thinking of a future where you fire up the example of Solr that demos some of the streaming expressions that are in the Ref Guide ;-)
   
   # Tests
   
   Manually tested with regular and solr cloud modes.
   
   # 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] epugh commented on pull request #409: SOLR-15786

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


   @erikhatcher you want to review?   


-- 
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 a change in pull request #409: SOLR-15786

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



##########
File path: solr/core/src/java/org/apache/solr/util/SolrCLI.java
##########
@@ -2845,8 +2845,42 @@ protected void runExample(CommandLine cli, String exampleName) throws Exception
           echo("exampledocs directory not found, skipping indexing step for the techproducts example");
         }
       }
+      else if ("films".equals(exampleName) && !alreadyExists) {
+        echo("Adding name and initial_release_data fields to films schema \"_default\"");
 
-      echo("\nSolr "+exampleName+" example launched successfully. Direct your Web browser to "+solrUrl+" to visit the Solr Admin UI");
+        HttpSolrClient solrClient = new HttpSolrClient.Builder(solrUrl).build();
+        try {
+          SolrCLI.postJsonToSolr(solrClient, "/" + collectionName + "/schema", "{\n" +

Review comment:
       Took another stab at this!   If you think using _default is just a bad idea/not helpful, would you mind opening another JIRA and I'll do the migration there ;-)????
   




-- 
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 merged pull request #409: SOLR-15786

Posted by GitBox <gi...@apache.org>.
epugh merged pull request #409:
URL: https://github.com/apache/solr/pull/409


   


-- 
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 #409: SOLR-15786

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


   @janhoy I'd love to have you look at this?!


-- 
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] HoustonPutman commented on a change in pull request #409: SOLR-15786

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



##########
File path: solr/core/src/java/org/apache/solr/util/SolrCLI.java
##########
@@ -2845,8 +2845,42 @@ protected void runExample(CommandLine cli, String exampleName) throws Exception
           echo("exampledocs directory not found, skipping indexing step for the techproducts example");
         }
       }
+      else if ("films".equals(exampleName) && !alreadyExists) {
+        echo("Adding name and initial_release_data fields to films schema \"_default\"");
 
-      echo("\nSolr "+exampleName+" example launched successfully. Direct your Web browser to "+solrUrl+" to visit the Solr Admin UI");
+        HttpSolrClient solrClient = new HttpSolrClient.Builder(solrUrl).build();
+        try {
+          SolrCLI.postJsonToSolr(solrClient, "/" + collectionName + "/schema", "{\n" +

Review comment:
       > Example of using the _default configset and adding fields dynamically.
   
   That makes me think that films is just using the dynamic fields available in _default, but here you are adding a few fields. Maybe we convert it to only use dynamic fields, or change the description to be a little clearer.




-- 
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 a change in pull request #409: SOLR-15786

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



##########
File path: solr/core/src/java/org/apache/solr/util/SolrCLI.java
##########
@@ -2845,8 +2845,42 @@ protected void runExample(CommandLine cli, String exampleName) throws Exception
           echo("exampledocs directory not found, skipping indexing step for the techproducts example");
         }
       }
+      else if ("films".equals(exampleName) && !alreadyExists) {
+        echo("Adding name and initial_release_data fields to films schema \"_default\"");
 
-      echo("\nSolr "+exampleName+" example launched successfully. Direct your Web browser to "+solrUrl+" to visit the Solr Admin UI");
+        HttpSolrClient solrClient = new HttpSolrClient.Builder(solrUrl).build();
+        try {
+          SolrCLI.postJsonToSolr(solrClient, "/" + collectionName + "/schema", "{\n" +

Review comment:
       Reading through https://github.com/apache/solr/tree/main/solr/example/films, the whole example makes a lot of assumptions that you are using _default.   If we get rid of schema autoguessing, then this whole example provides much less value.    (Oh, and despite it being an example of the `useParams` parameter according to ref guide, I don't actually see it mentioned or used!  sigh)




-- 
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 a change in pull request #409: SOLR-15786

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



##########
File path: solr/core/src/java/org/apache/solr/util/SolrCLI.java
##########
@@ -2845,8 +2845,42 @@ protected void runExample(CommandLine cli, String exampleName) throws Exception
           echo("exampledocs directory not found, skipping indexing step for the techproducts example");
         }
       }
+      else if ("films".equals(exampleName) && !alreadyExists) {
+        echo("Adding name and initial_release_data fields to films schema \"_default\"");
 
-      echo("\nSolr "+exampleName+" example launched successfully. Direct your Web browser to "+solrUrl+" to visit the Solr Admin UI");
+        HttpSolrClient solrClient = new HttpSolrClient.Builder(solrUrl).build();
+        try {
+          SolrCLI.postJsonToSolr(solrClient, "/" + collectionName + "/schema", "{\n" +

Review comment:
       I ended up digging into the README for the films example and created https://issues.apache.org/jira/browse/SOLR-15834




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