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/25 09:08:46 UTC

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

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