You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/05/24 10:33:23 UTC

[GitHub] [lucene] mocobeta opened a new pull request, #923: Replace classpath with modulepath in the demo tutorial

mocobeta opened a new pull request, #923:
URL: https://github.com/apache/lucene/pull/923

   ### Description (or a Jira issue link if you have one)
   
   This is a minor update for `demo` module documentation.
   I had a chance to run the demo app and noticed that commands in the tutorial use `CLASSPATH` (and the description has been outdated); maybe it'd be worth updating to use modulepath instead of classpath?
   
   The latest tutorial:
   ![Screenshot from 2022-05-24 19-28-13](https://user-images.githubusercontent.com/1825333/170011199-2d13f34c-ef36-46c5-b5fb-e297c7d0510e.png)
   
   Updated tutorial in this patch:
   ![Screenshot from 2022-05-24 19-28-45](https://user-images.githubusercontent.com/1825333/170011328-cdde36d8-a17d-449f-ad8b-4e7909c8dde6.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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1137448834

   I first thought it is sufficient to have a concrete working command for a Unix-like platform that based on module path, seems like things are not so obvious. I don't know what should I do here - I'll leave it for now.


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1140180971

   Also thank you both for your comments - at least I learned the subtle difficulties related to launching commands (again).


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on a diff in pull request #923: Replace classpath with modulepath in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on code in PR #923:
URL: https://github.com/apache/lucene/pull/923#discussion_r881413568


##########
lucene/demo/src/java/overview.html:
##########
@@ -49,36 +49,35 @@ <h2 class="boxed">About the Demo</h2>
 demonstrates various functionalities of Lucene and how you can add Lucene to
 your applications.</p>
 </div>
-<a id="Setting_your_CLASSPATH"></a>
-<h2 class="boxed">Setting your CLASSPATH</h2>
+<a id="Setting_your_MODULEPATH"></a>
+<h2 class="boxed">Setting your MODULEPATH</h2>
 <div class="section">
 <p>First, you should <a href=
 "http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the latest
 Lucene distribution and then extract it to a working directory.</p>
-<p>You need four JARs: the Lucene JAR, the queryparser JAR, the common analysis JAR, and the Lucene
-demo JAR. You should see the Lucene JAR file in the modules/ directory you created
+<p>You need Lucene demo and a few dependent modules.
+You should see the Lucene module (JAR) files in the modules/ and modules-thirdparty/ directory you created
 when you extracted the archive -- it should be named something like
 <span class="codefrag">lucene-core-{version}.jar</span>. You should also see
 files called <span class="codefrag">lucene-queryparser-{version}.jar</span>,
 <span class=
 "codefrag">lucene-analysis-common-{version}.jar</span> and <span class=
-"codefrag">lucene-demo-{version}.jar</span> under queryparser, analysis/common/ and demo/,
-respectively.</p>
-<p>Put all four of these files in your Java CLASSPATH.</p>
+"codefrag">lucene-demo-{version}.jar</span> under modules directory.</p>
+<p>Put all of these files in your Java MODULEPATH.</p>
 </div>
 <a id="Indexing_Files"></a>
 <h2 class="boxed">Indexing Files</h2>
 <div class="section">
 <p>Once you've gotten this far you're probably itching to go. Let's <b>build an
-index!</b> Assuming you've set your CLASSPATH correctly, just type:</p>
+index!</b> Just type:</p>
 <pre>
-    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+    java --module-path modules:modules-thirdparty --module org.apache.lucene.demo/org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
 </pre>
 This will produce a subdirectory called <span class="codefrag">index</span>
 which will contain an index of all of the Lucene source code.
 <p>To <b>search the index</b> type:</p>
 <pre>
-    java org.apache.lucene.demo.SearchFiles
+    java --module-path modules:modules-thirdparty --add-modules jdk.unsupported --module org.apache.lucene.demo/org.apache.lucene.demo.SearchFiles
 </pre>
 You'll be prompted for a query. Type in a gibberish or made up word (for example: 
 "superca<!-- need to break up word in a way that is not visibile so it doesn't cause this ile to match a search on this word -->lifragilisticexpialidocious").

Review Comment:
   Fixed in https://github.com/apache/lucene/pull/923/commits/d400d7bed703999c050407f9f5b6cf9c0f66b748 - I still can't detect typos in English by just quickly skimming :)



-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on a diff in pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on code in PR #923:
URL: https://github.com/apache/lucene/pull/923#discussion_r881797523


##########
lucene/demo/src/java/overview.html:
##########
@@ -49,40 +49,49 @@ <h2 class="boxed">About the Demo</h2>
 demonstrates various functionalities of Lucene and how you can add Lucene to
 your applications.</p>
 </div>
-<a id="Setting_your_CLASSPATH"></a>
-<h2 class="boxed">Setting your CLASSPATH</h2>
+<a id="Setting_your_module_path"></a>
+<h2 class="boxed">Setting your module path (or classpath)</h2>
 <div class="section">
 <p>First, you should <a href=
 "http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the latest
 Lucene distribution and then extract it to a working directory.</p>
-<p>You need four JARs: the Lucene JAR, the queryparser JAR, the common analysis JAR, and the Lucene
-demo JAR. You should see the Lucene JAR file in the modules/ directory you created
-when you extracted the archive -- it should be named something like
+<p>You need Lucene demo and a few dependent modules.
+You should see the Lucene modules (JARs) in the modules/ and third party modules in the modules-thirdparty/ directory
+you created when you extracted the archive -- it should be named something like
 <span class="codefrag">lucene-core-{version}.jar</span>. You should also see
 files called <span class="codefrag">lucene-queryparser-{version}.jar</span>,
 <span class=
 "codefrag">lucene-analysis-common-{version}.jar</span> and <span class=
-"codefrag">lucene-demo-{version}.jar</span> under queryparser, analysis/common/ and demo/,
-respectively.</p>
-<p>Put all four of these files in your Java CLASSPATH.</p>
+"codefrag">lucene-demo-{version}.jar</span> under modules directory.</p>
+<p>There are two ways to run Java program: with module path or with classpath. Either way is fine. Put all of these files in your Java module path or classpath.</p>
 </div>
 <a id="Indexing_Files"></a>
 <h2 class="boxed">Indexing Files</h2>
 <div class="section">
 <p>Once you've gotten this far you're probably itching to go. Let's <b>build an
-index!</b> Assuming you've set your CLASSPATH correctly, just type:</p>
+index!</b> Just type either command:</p>
+<p>With module path</p>
 <pre>
-    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+    java --module-path modules:modules-thirdparty --module org.apache.lucene.demo/org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+</pre>
+<p>With classpath</p>
+<pre>
+    java -cp "modules/*:modules-thirdparty/*" org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}

Review Comment:
   But of course, we can add a section for Windows platform. I'm not sure how far we should care but if we want to provide "working" commands without previous knowledge for both Unix-like and Windows, we should allow the verboseness?



-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] msokolov commented on pull request #923: Replace classpath with modulepath in the demo tutorial

Posted by GitBox <gi...@apache.org>.
msokolov commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1136012481

   
   >>  I found a few typos; if you have a moment maybe you could fix while you're updating?
   
   > Sure, could you tell me the lines we should fix?
   
   Hmm I added comments above, but github didn't post them yet - coming soon...


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] dweiss commented on a diff in pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
dweiss commented on code in PR #923:
URL: https://github.com/apache/lucene/pull/923#discussion_r881886986


##########
lucene/demo/src/java/overview.html:
##########
@@ -49,40 +49,49 @@ <h2 class="boxed">About the Demo</h2>
 demonstrates various functionalities of Lucene and how you can add Lucene to
 your applications.</p>
 </div>
-<a id="Setting_your_CLASSPATH"></a>
-<h2 class="boxed">Setting your CLASSPATH</h2>
+<a id="Setting_your_module_path"></a>
+<h2 class="boxed">Setting your module path (or classpath)</h2>
 <div class="section">
 <p>First, you should <a href=
 "http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the latest
 Lucene distribution and then extract it to a working directory.</p>
-<p>You need four JARs: the Lucene JAR, the queryparser JAR, the common analysis JAR, and the Lucene
-demo JAR. You should see the Lucene JAR file in the modules/ directory you created
-when you extracted the archive -- it should be named something like
+<p>You need Lucene demo and a few dependent modules.
+You should see the Lucene modules (JARs) in the modules/ and third party modules in the modules-thirdparty/ directory
+you created when you extracted the archive -- it should be named something like
 <span class="codefrag">lucene-core-{version}.jar</span>. You should also see
 files called <span class="codefrag">lucene-queryparser-{version}.jar</span>,
 <span class=
 "codefrag">lucene-analysis-common-{version}.jar</span> and <span class=
-"codefrag">lucene-demo-{version}.jar</span> under queryparser, analysis/common/ and demo/,
-respectively.</p>
-<p>Put all four of these files in your Java CLASSPATH.</p>
+"codefrag">lucene-demo-{version}.jar</span> under modules directory.</p>
+<p>There are two ways to run Java program: with module path or with classpath. Either way is fine. Put all of these files in your Java module path or classpath.</p>
 </div>
 <a id="Indexing_Files"></a>
 <h2 class="boxed">Indexing Files</h2>
 <div class="section">
 <p>Once you've gotten this far you're probably itching to go. Let's <b>build an
-index!</b> Assuming you've set your CLASSPATH correctly, just type:</p>
+index!</b> Just type either command:</p>
+<p>With module path</p>
 <pre>
-    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+    java --module-path modules:modules-thirdparty --module org.apache.lucene.demo/org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+</pre>
+<p>With classpath</p>
+<pre>
+    java -cp "modules/*:modules-thirdparty/*" org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}

Review Comment:
   Ok, let's leave Windows out of it. People on Windows will know what to do, I think.



-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on pull request #923: LUCENE-10200: Replace classpath with modulepath in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1137171363

   Anyway the outdated instruction would need to be corrected.
   Maybe we can write both working commands for classpath and module path? Let me adjust it...


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] dweiss commented on a diff in pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
dweiss commented on code in PR #923:
URL: https://github.com/apache/lucene/pull/923#discussion_r881759841


##########
lucene/demo/src/java/overview.html:
##########
@@ -49,40 +49,49 @@ <h2 class="boxed">About the Demo</h2>
 demonstrates various functionalities of Lucene and how you can add Lucene to
 your applications.</p>
 </div>
-<a id="Setting_your_CLASSPATH"></a>
-<h2 class="boxed">Setting your CLASSPATH</h2>
+<a id="Setting_your_module_path"></a>
+<h2 class="boxed">Setting your module path (or classpath)</h2>
 <div class="section">
 <p>First, you should <a href=
 "http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the latest
 Lucene distribution and then extract it to a working directory.</p>
-<p>You need four JARs: the Lucene JAR, the queryparser JAR, the common analysis JAR, and the Lucene
-demo JAR. You should see the Lucene JAR file in the modules/ directory you created
-when you extracted the archive -- it should be named something like
+<p>You need Lucene demo and a few dependent modules.
+You should see the Lucene modules (JARs) in the modules/ and third party modules in the modules-thirdparty/ directory
+you created when you extracted the archive -- it should be named something like
 <span class="codefrag">lucene-core-{version}.jar</span>. You should also see
 files called <span class="codefrag">lucene-queryparser-{version}.jar</span>,
 <span class=
 "codefrag">lucene-analysis-common-{version}.jar</span> and <span class=
-"codefrag">lucene-demo-{version}.jar</span> under queryparser, analysis/common/ and demo/,
-respectively.</p>
-<p>Put all four of these files in your Java CLASSPATH.</p>
+"codefrag">lucene-demo-{version}.jar</span> under modules directory.</p>
+<p>There are two ways to run Java program: with module path or with classpath. Either way is fine. Put all of these files in your Java module path or classpath.</p>
 </div>
 <a id="Indexing_Files"></a>
 <h2 class="boxed">Indexing Files</h2>
 <div class="section">
 <p>Once you've gotten this far you're probably itching to go. Let's <b>build an
-index!</b> Assuming you've set your CLASSPATH correctly, just type:</p>
+index!</b> Just type either command:</p>
+<p>With module path</p>
 <pre>
-    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+    java --module-path modules:modules-thirdparty --module org.apache.lucene.demo/org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+</pre>
+<p>With classpath</p>
+<pre>
+    java -cp "modules/*:modules-thirdparty/*" org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}

Review Comment:
   I double checked and, with some surprise, discovered that it does support a quirky glob format (has to be a single *, not a full glob). Anyway, I wouldn't bet this works across platforms with the colon and slashes in the cp argument... 



-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on a diff in pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on code in PR #923:
URL: https://github.com/apache/lucene/pull/923#discussion_r881765516


##########
lucene/demo/src/java/overview.html:
##########
@@ -49,40 +49,49 @@ <h2 class="boxed">About the Demo</h2>
 demonstrates various functionalities of Lucene and how you can add Lucene to
 your applications.</p>
 </div>
-<a id="Setting_your_CLASSPATH"></a>
-<h2 class="boxed">Setting your CLASSPATH</h2>
+<a id="Setting_your_module_path"></a>
+<h2 class="boxed">Setting your module path (or classpath)</h2>
 <div class="section">
 <p>First, you should <a href=
 "http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the latest
 Lucene distribution and then extract it to a working directory.</p>
-<p>You need four JARs: the Lucene JAR, the queryparser JAR, the common analysis JAR, and the Lucene
-demo JAR. You should see the Lucene JAR file in the modules/ directory you created
-when you extracted the archive -- it should be named something like
+<p>You need Lucene demo and a few dependent modules.
+You should see the Lucene modules (JARs) in the modules/ and third party modules in the modules-thirdparty/ directory
+you created when you extracted the archive -- it should be named something like
 <span class="codefrag">lucene-core-{version}.jar</span>. You should also see
 files called <span class="codefrag">lucene-queryparser-{version}.jar</span>,
 <span class=
 "codefrag">lucene-analysis-common-{version}.jar</span> and <span class=
-"codefrag">lucene-demo-{version}.jar</span> under queryparser, analysis/common/ and demo/,
-respectively.</p>
-<p>Put all four of these files in your Java CLASSPATH.</p>
+"codefrag">lucene-demo-{version}.jar</span> under modules directory.</p>
+<p>There are two ways to run Java program: with module path or with classpath. Either way is fine. Put all of these files in your Java module path or classpath.</p>
 </div>
 <a id="Indexing_Files"></a>
 <h2 class="boxed">Indexing Files</h2>
 <div class="section">
 <p>Once you've gotten this far you're probably itching to go. Let's <b>build an
-index!</b> Assuming you've set your CLASSPATH correctly, just type:</p>
+index!</b> Just type either command:</p>
+<p>With module path</p>
 <pre>
-    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+    java --module-path modules:modules-thirdparty --module org.apache.lucene.demo/org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+</pre>
+<p>With classpath</p>
+<pre>
+    java -cp "modules/*:modules-thirdparty/*" org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}

Review Comment:
   It works, I confirmed this command. There is "Understanding class path wildcards" section in the documentation.
   https://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html
   
   As for the delimiter, I didn't think we should list up all commands for Windows and Linux/Mac; then I omitted Windows here... sorry but the tutorial is written for Unix-like platform from the beginning.



-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta closed pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta closed pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial
URL: https://github.com/apache/lucene/pull/923


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on pull request #923: Replace classpath with modulepath in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1135776812

   note: `modules-thirdparty` should be included on the module path since it depends on `hppc` via `lucene-facet`. Also it seems good to add `--add-modules jdk.unsupported` when running `SearchFiles`, otherwise, it emits (a little intimidating) "WARNING: Unmapping is not supported, ..." message. 


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on a diff in pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on code in PR #923:
URL: https://github.com/apache/lucene/pull/923#discussion_r881797523


##########
lucene/demo/src/java/overview.html:
##########
@@ -49,40 +49,49 @@ <h2 class="boxed">About the Demo</h2>
 demonstrates various functionalities of Lucene and how you can add Lucene to
 your applications.</p>
 </div>
-<a id="Setting_your_CLASSPATH"></a>
-<h2 class="boxed">Setting your CLASSPATH</h2>
+<a id="Setting_your_module_path"></a>
+<h2 class="boxed">Setting your module path (or classpath)</h2>
 <div class="section">
 <p>First, you should <a href=
 "http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the latest
 Lucene distribution and then extract it to a working directory.</p>
-<p>You need four JARs: the Lucene JAR, the queryparser JAR, the common analysis JAR, and the Lucene
-demo JAR. You should see the Lucene JAR file in the modules/ directory you created
-when you extracted the archive -- it should be named something like
+<p>You need Lucene demo and a few dependent modules.
+You should see the Lucene modules (JARs) in the modules/ and third party modules in the modules-thirdparty/ directory
+you created when you extracted the archive -- it should be named something like
 <span class="codefrag">lucene-core-{version}.jar</span>. You should also see
 files called <span class="codefrag">lucene-queryparser-{version}.jar</span>,
 <span class=
 "codefrag">lucene-analysis-common-{version}.jar</span> and <span class=
-"codefrag">lucene-demo-{version}.jar</span> under queryparser, analysis/common/ and demo/,
-respectively.</p>
-<p>Put all four of these files in your Java CLASSPATH.</p>
+"codefrag">lucene-demo-{version}.jar</span> under modules directory.</p>
+<p>There are two ways to run Java program: with module path or with classpath. Either way is fine. Put all of these files in your Java module path or classpath.</p>
 </div>
 <a id="Indexing_Files"></a>
 <h2 class="boxed">Indexing Files</h2>
 <div class="section">
 <p>Once you've gotten this far you're probably itching to go. Let's <b>build an
-index!</b> Assuming you've set your CLASSPATH correctly, just type:</p>
+index!</b> Just type either command:</p>
+<p>With module path</p>
 <pre>
-    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+    java --module-path modules:modules-thirdparty --module org.apache.lucene.demo/org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+</pre>
+<p>With classpath</p>
+<pre>
+    java -cp "modules/*:modules-thirdparty/*" org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}

Review Comment:
   But of course, we can add a section for Windows platform. I'm not sure how far we should care but if we want to provide "working" commands without previous knowledge for both Unix-like and Windows platforms, we should allow the verboseness?



-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1137531284

   Just a note... the thing I wanted to fix is, that the current tutorial has been outdated on many points - I don't think people can run the demo app without trials and error. 
   Classpath vs module path shouldn't be the main interest here, I think the module-path based explanation would be reasonable from several viewpoints though. I might mislead the conversation from the start if we fell into bikeshedding.


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] msokolov commented on pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
msokolov commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1137209317

   >  The problem with classpath is that you need to include all JARs individually this is handled much better by modules since you include the directory path (not each individual module JAR).
   
   Oh, that is better! Although I have gotten used to using `*.jar` in classpaths which helps shrink them down to be more manageable


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] msokolov commented on pull request #923: Replace classpath with modulepath in the demo tutorial

Posted by GitBox <gi...@apache.org>.
msokolov commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1135853409

   I found a few typos; if you have a moment maybe you could fix while you're updating?
   
   I'm also curious - is it still possible to use the old way (with CLASSPATH / -cp)? Also, is MODULEPATH an environment variable like CLASSPATH? If it is, do we also need the command-line arguments as shown?  I guess the previous documentation didn't really explain how to set the CLASSPATH, but given that MODULEPATH is a new thing and many users may be unfamiliar with it, maybe we should take the chance to educate a bit how to use it here.                                       


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] dweiss commented on a diff in pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
dweiss commented on code in PR #923:
URL: https://github.com/apache/lucene/pull/923#discussion_r881755153


##########
lucene/demo/src/java/overview.html:
##########
@@ -49,40 +49,49 @@ <h2 class="boxed">About the Demo</h2>
 demonstrates various functionalities of Lucene and how you can add Lucene to
 your applications.</p>
 </div>
-<a id="Setting_your_CLASSPATH"></a>
-<h2 class="boxed">Setting your CLASSPATH</h2>
+<a id="Setting_your_module_path"></a>
+<h2 class="boxed">Setting your module path (or classpath)</h2>
 <div class="section">
 <p>First, you should <a href=
 "http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the latest
 Lucene distribution and then extract it to a working directory.</p>
-<p>You need four JARs: the Lucene JAR, the queryparser JAR, the common analysis JAR, and the Lucene
-demo JAR. You should see the Lucene JAR file in the modules/ directory you created
-when you extracted the archive -- it should be named something like
+<p>You need Lucene demo and a few dependent modules.
+You should see the Lucene modules (JARs) in the modules/ and third party modules in the modules-thirdparty/ directory
+you created when you extracted the archive -- it should be named something like
 <span class="codefrag">lucene-core-{version}.jar</span>. You should also see
 files called <span class="codefrag">lucene-queryparser-{version}.jar</span>,
 <span class=
 "codefrag">lucene-analysis-common-{version}.jar</span> and <span class=
-"codefrag">lucene-demo-{version}.jar</span> under queryparser, analysis/common/ and demo/,
-respectively.</p>
-<p>Put all four of these files in your Java CLASSPATH.</p>
+"codefrag">lucene-demo-{version}.jar</span> under modules directory.</p>
+<p>There are two ways to run Java program: with module path or with classpath. Either way is fine. Put all of these files in your Java module path or classpath.</p>
 </div>
 <a id="Indexing_Files"></a>
 <h2 class="boxed">Indexing Files</h2>
 <div class="section">
 <p>Once you've gotten this far you're probably itching to go. Let's <b>build an
-index!</b> Assuming you've set your CLASSPATH correctly, just type:</p>
+index!</b> Just type either command:</p>
+<p>With module path</p>
 <pre>
-    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+    java --module-path modules:modules-thirdparty --module org.apache.lucene.demo/org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+</pre>
+<p>With classpath</p>
+<pre>
+    java -cp "modules/*:modules-thirdparty/*" org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}

Review Comment:
   I don't think it'll work. Java doesn't expand wildcards in arguments. Also, the path delimiter varies between platforms (Windows uses a semicolon)...



-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] dweiss commented on pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
dweiss commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1139999873

   Umm.. I agree with Mike, Tomoko - the improvement was there and evident. Can we commit it in and maybe reiterate if we find a better wording in the future? What you did was way better than it had been 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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on pull request #923: LUCENE-10200: Replace classpath with modulepath in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1137010121

   I hooked this on LUCENE-10200 - actually, the tutorial has been obsoleted by the change in the way to assemble the binary distribution.
   Still, we can stick to classpath though, I feel like it'd be clearer to switch to module path to align with the binary release structure (as well as the Luke launch script).
   


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] msokolov commented on pull request #923: LUCENE-10200: Replace classpath with modulepath in the demo tutorial

Posted by GitBox <gi...@apache.org>.
msokolov commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1137160783

   Thanks for fixing those (pre-existing) typos. On the classpath/module path change I have mixed feelings. On the one hand, we should broadcast that we are now fully modularized and support using module paths to declare dependencies on code. On the other hand, I don't even know how to "put jars on my module path" yet. Maybe I'm just a stick-in-the-mud, but modules still seems very new and I suspect many (most) Java devs probably haven't yet figured it out and are still using class-path? So, I'm not sure what that means for this documentation. It doesn't seem as if this is the right place to explain modules and class paths, but we want to make this accessible and easy to use. Maybe we could include both sets of directions?


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on a diff in pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on code in PR #923:
URL: https://github.com/apache/lucene/pull/923#discussion_r881678572


##########
lucene/demo/src/java/overview.html:
##########
@@ -49,40 +49,49 @@ <h2 class="boxed">About the Demo</h2>
 demonstrates various functionalities of Lucene and how you can add Lucene to
 your applications.</p>
 </div>
-<a id="Setting_your_CLASSPATH"></a>
-<h2 class="boxed">Setting your CLASSPATH</h2>
+<a id="Setting_your_module_path"></a>
+<h2 class="boxed">Setting your module path (or classpath)</h2>
 <div class="section">
 <p>First, you should <a href=
 "http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the latest
 Lucene distribution and then extract it to a working directory.</p>
-<p>You need four JARs: the Lucene JAR, the queryparser JAR, the common analysis JAR, and the Lucene
-demo JAR. You should see the Lucene JAR file in the modules/ directory you created
-when you extracted the archive -- it should be named something like
+<p>You need Lucene demo and a few dependent modules.
+You should see the Lucene modules (JARs) in the modules/ and third party modules in the modules-thirdparty/ directory
+you created when you extracted the archive -- it should be named something like
 <span class="codefrag">lucene-core-{version}.jar</span>. You should also see
 files called <span class="codefrag">lucene-queryparser-{version}.jar</span>,
 <span class=
 "codefrag">lucene-analysis-common-{version}.jar</span> and <span class=
-"codefrag">lucene-demo-{version}.jar</span> under queryparser, analysis/common/ and demo/,
-respectively.</p>
-<p>Put all four of these files in your Java CLASSPATH.</p>
+"codefrag">lucene-demo-{version}.jar</span> under modules directory.</p>
+<p>There are two ways to run Java program: with module path or with classpath. Either way is fine. Put all of these files in your Java module path or classpath.</p>
 </div>
 <a id="Indexing_Files"></a>
 <h2 class="boxed">Indexing Files</h2>
 <div class="section">
 <p>Once you've gotten this far you're probably itching to go. Let's <b>build an
-index!</b> Assuming you've set your CLASSPATH correctly, just type:</p>
+index!</b> Just type either command:</p>
+<p>With module path</p>
 <pre>
-    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+    java --module-path modules:modules-thirdparty --module org.apache.lucene.demo/org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+</pre>
+<p>With classpath</p>
+<pre>
+    java -cp "modules/*:modules-thirdparty/*" org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}

Review Comment:
   It's not a good practice to put all jars into classpath with wildcard at all, however, I don't think we can maintain the correct jar list (it was proved in the latest tutorial - the jar list there had been outdated long before 9.0, and this is another reason why I'd prefer module path).



-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1137271336

   I updated the text so that we have both working commands for module path and classpath in it. Please see the updated screenshot in the PR description to see how it looks, thanks.


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on pull request #923: Replace classpath with modulepath in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1135877621

   >  Also, is MODULEPATH an environment variable like CLASSPATH? 
   
   Thanks, it's a very good point; to the best of my knowledge, there is no environment variable to implicitly set module paths such as `MODULEPATH`. The fully capitalized term is misleading, I updated it to the normal "module path".
   
   > I'm also curious - is it still possible to use the old way (with CLASSPATH / -cp)?
   
   Yes, classpath will continue to remain and I think it's unlikely to happen to be dropped.
   
   > I found a few typos; if you have a moment maybe you could fix while you're updating?
   
   Sure, could you tell me the lines we should fix?


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] msokolov commented on a diff in pull request #923: Replace classpath with modulepath in the demo tutorial

Posted by GitBox <gi...@apache.org>.
msokolov commented on code in PR #923:
URL: https://github.com/apache/lucene/pull/923#discussion_r880432441


##########
lucene/demo/src/java/overview.html:
##########
@@ -49,36 +49,35 @@ <h2 class="boxed">About the Demo</h2>
 demonstrates various functionalities of Lucene and how you can add Lucene to
 your applications.</p>
 </div>
-<a id="Setting_your_CLASSPATH"></a>
-<h2 class="boxed">Setting your CLASSPATH</h2>
+<a id="Setting_your_MODULEPATH"></a>
+<h2 class="boxed">Setting your MODULEPATH</h2>
 <div class="section">
 <p>First, you should <a href=
 "http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the latest
 Lucene distribution and then extract it to a working directory.</p>
-<p>You need four JARs: the Lucene JAR, the queryparser JAR, the common analysis JAR, and the Lucene
-demo JAR. You should see the Lucene JAR file in the modules/ directory you created
+<p>You need Lucene demo and a few dependent modules.
+You should see the Lucene module (JAR) files in the modules/ and modules-thirdparty/ directory you created
 when you extracted the archive -- it should be named something like
 <span class="codefrag">lucene-core-{version}.jar</span>. You should also see
 files called <span class="codefrag">lucene-queryparser-{version}.jar</span>,
 <span class=
 "codefrag">lucene-analysis-common-{version}.jar</span> and <span class=
-"codefrag">lucene-demo-{version}.jar</span> under queryparser, analysis/common/ and demo/,
-respectively.</p>
-<p>Put all four of these files in your Java CLASSPATH.</p>
+"codefrag">lucene-demo-{version}.jar</span> under modules directory.</p>
+<p>Put all of these files in your Java MODULEPATH.</p>
 </div>
 <a id="Indexing_Files"></a>
 <h2 class="boxed">Indexing Files</h2>
 <div class="section">
 <p>Once you've gotten this far you're probably itching to go. Let's <b>build an
-index!</b> Assuming you've set your CLASSPATH correctly, just type:</p>
+index!</b> Just type:</p>
 <pre>
-    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+    java --module-path modules:modules-thirdparty --module org.apache.lucene.demo/org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
 </pre>
 This will produce a subdirectory called <span class="codefrag">index</span>
 which will contain an index of all of the Lucene source code.
 <p>To <b>search the index</b> type:</p>
 <pre>
-    java org.apache.lucene.demo.SearchFiles
+    java --module-path modules:modules-thirdparty --add-modules jdk.unsupported --module org.apache.lucene.demo/org.apache.lucene.demo.SearchFiles
 </pre>
 You'll be prompted for a query. Type in a gibberish or made up word (for example: 
 "superca<!-- need to break up word in a way that is not visibile so it doesn't cause this ile to match a search on this word -->lifragilisticexpialidocious").

Review Comment:
   "visibile" -> "visible"
   "ile" -> "file"



##########
lucene/demo/src/java/overview.html:
##########
@@ -49,36 +49,35 @@ <h2 class="boxed">About the Demo</h2>
 demonstrates various functionalities of Lucene and how you can add Lucene to
 your applications.</p>
 </div>
-<a id="Setting_your_CLASSPATH"></a>
-<h2 class="boxed">Setting your CLASSPATH</h2>
+<a id="Setting_your_MODULEPATH"></a>
+<h2 class="boxed">Setting your MODULEPATH</h2>
 <div class="section">
 <p>First, you should <a href=
 "http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the latest
 Lucene distribution and then extract it to a working directory.</p>
-<p>You need four JARs: the Lucene JAR, the queryparser JAR, the common analysis JAR, and the Lucene
-demo JAR. You should see the Lucene JAR file in the modules/ directory you created
+<p>You need Lucene demo and a few dependent modules.
+You should see the Lucene module (JAR) files in the modules/ and modules-thirdparty/ directory you created
 when you extracted the archive -- it should be named something like
 <span class="codefrag">lucene-core-{version}.jar</span>. You should also see
 files called <span class="codefrag">lucene-queryparser-{version}.jar</span>,
 <span class=
 "codefrag">lucene-analysis-common-{version}.jar</span> and <span class=
-"codefrag">lucene-demo-{version}.jar</span> under queryparser, analysis/common/ and demo/,
-respectively.</p>
-<p>Put all four of these files in your Java CLASSPATH.</p>
+"codefrag">lucene-demo-{version}.jar</span> under modules directory.</p>
+<p>Put all of these files in your Java MODULEPATH.</p>
 </div>
 <a id="Indexing_Files"></a>
 <h2 class="boxed">Indexing Files</h2>
 <div class="section">
 <p>Once you've gotten this far you're probably itching to go. Let's <b>build an
-index!</b> Assuming you've set your CLASSPATH correctly, just type:</p>
+index!</b> Just type:</p>
 <pre>
-    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+    java --module-path modules:modules-thirdparty --module org.apache.lucene.demo/org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
 </pre>
 This will produce a subdirectory called <span class="codefrag">index</span>
 which will contain an index of all of the Lucene source code.
 <p>To <b>search the index</b> type:</p>
 <pre>
-    java org.apache.lucene.demo.SearchFiles
+    java --module-path modules:modules-thirdparty --add-modules jdk.unsupported --module org.apache.lucene.demo/org.apache.lucene.demo.SearchFiles
 </pre>
 You'll be prompted for a query. Type in a gibberish or made up word (for example: 
 "superca<!-- need to break up word in a way that is not visibile so it doesn't cause this ile to match a search on this word -->lifragilisticexpialidocious").

Review Comment:
   "maching" -> "matching"



-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on a diff in pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on code in PR #923:
URL: https://github.com/apache/lucene/pull/923#discussion_r881765516


##########
lucene/demo/src/java/overview.html:
##########
@@ -49,40 +49,49 @@ <h2 class="boxed">About the Demo</h2>
 demonstrates various functionalities of Lucene and how you can add Lucene to
 your applications.</p>
 </div>
-<a id="Setting_your_CLASSPATH"></a>
-<h2 class="boxed">Setting your CLASSPATH</h2>
+<a id="Setting_your_module_path"></a>
+<h2 class="boxed">Setting your module path (or classpath)</h2>
 <div class="section">
 <p>First, you should <a href=
 "http://www.apache.org/dyn/closer.cgi/lucene/java/">download</a> the latest
 Lucene distribution and then extract it to a working directory.</p>
-<p>You need four JARs: the Lucene JAR, the queryparser JAR, the common analysis JAR, and the Lucene
-demo JAR. You should see the Lucene JAR file in the modules/ directory you created
-when you extracted the archive -- it should be named something like
+<p>You need Lucene demo and a few dependent modules.
+You should see the Lucene modules (JARs) in the modules/ and third party modules in the modules-thirdparty/ directory
+you created when you extracted the archive -- it should be named something like
 <span class="codefrag">lucene-core-{version}.jar</span>. You should also see
 files called <span class="codefrag">lucene-queryparser-{version}.jar</span>,
 <span class=
 "codefrag">lucene-analysis-common-{version}.jar</span> and <span class=
-"codefrag">lucene-demo-{version}.jar</span> under queryparser, analysis/common/ and demo/,
-respectively.</p>
-<p>Put all four of these files in your Java CLASSPATH.</p>
+"codefrag">lucene-demo-{version}.jar</span> under modules directory.</p>
+<p>There are two ways to run Java program: with module path or with classpath. Either way is fine. Put all of these files in your Java module path or classpath.</p>
 </div>
 <a id="Indexing_Files"></a>
 <h2 class="boxed">Indexing Files</h2>
 <div class="section">
 <p>Once you've gotten this far you're probably itching to go. Let's <b>build an
-index!</b> Assuming you've set your CLASSPATH correctly, just type:</p>
+index!</b> Just type either command:</p>
+<p>With module path</p>
 <pre>
-    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+    java --module-path modules:modules-thirdparty --module org.apache.lucene.demo/org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}
+</pre>
+<p>With classpath</p>
+<pre>
+    java -cp "modules/*:modules-thirdparty/*" org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}

Review Comment:
   It works, I confirmed this command. There is "Understanding class path wildcards" section in the documentation.
   https://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html
   
   As for the delimiter, I didn't think we should list up all commands for Windows and Linux/Mac; then I committed Windows here... sorry but the tutorial is written for Unix-like platform from the beginning.



-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on pull request #923: Replace classpath with modulepath in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1135898983

   > I guess the previous documentation didn't really explain how to set the CLASSPATH, but given that MODULEPATH is a new thing and many users may be unfamiliar with it, maybe we should take the chance to educate a bit how to use it here.
   
   Instead of explaining what is java module system and its usage, I would give concrete commands that work by copy-pasting for this tutorial.
   
   


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] dweiss commented on pull request #923: LUCENE-10200: Replace classpath with modulepath in the demo tutorial

Posted by GitBox <gi...@apache.org>.
dweiss commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1137165723

   Modular are not new, they're just not widespread... I agree with @mocobeta that if you provide an explicit command line then there is little harm in not explaining all the options. The problem with classpath is that you need to include all JARs individually  this is handled much better by modules since you include the directory path (not each individual module JAR).
   
   This said, I don't have a strong opinion about going either way. 


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1140176391

   I'm unsure if the change improves it. Thinking calmly there are two questions in the change here.
   1. The start commands for the demo app are no longer platform agnostic.
       - The old one works on any platform since it does not include any file paths in it - it picks CLASSPATH environment variable.
   2. Put all jars in a directory into classpath with `*` is not great.
       - Old one says "Put all four of these files in your Java CLASSPATH." - yes it's the correct way to encourage people to find necessary jars and construct classpath on their own, except for the list of jars is obsoleted.
   
   As we saw things seem not so obvious as I first thought, I would postpone it for now; anyway it does not a big deal I think.


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] msokolov commented on pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
msokolov commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1139740650

   I don't understand what happened here - I'm truly sorry if I somehow (bikeshedding?) discouraged you from improving the instructions here; if it wasn't clear: I thought what you had proposed was an improvement.


-- 
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@lucene.apache.org

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


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


[GitHub] [lucene] mocobeta commented on pull request #923: LUCENE-10200: Correct outdated instruction in the demo tutorial

Posted by GitBox <gi...@apache.org>.
mocobeta commented on PR #923:
URL: https://github.com/apache/lucene/pull/923#issuecomment-1139813850

   I was just unsure where to go for improving it. There will be a better way that does not overwhelm the readers of this tutorial with unfalimiar concepts or too wordy descriptions, I haven't found it yet though. Maybe, I'll open another one sometime.


-- 
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@lucene.apache.org

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


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