diff --git a/src/java/overview.html b/src/java/overview.html index 90144b5f07f..88e342c7a3c 100644 --- a/src/java/overview.html +++ b/src/java/overview.html @@ -27,7 +27,7 @@ to check if the results are what we expect):

- +
@@ -35,7 +35,7 @@ to check if the results are what we expect):

+
-    Analyzer analyzer = new StandardAnalyzer();
+    Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_CURRENT);

    // Store the index in memory:
    Directory directory = new RAMDirectory();
@@ -51,7 +51,7 @@ to check if the results are what we expect):

    iwriter.close();
    
    // Now search the index:
-    IndexSearcher isearcher = new IndexSearcher(directory);
+    IndexSearcher isearcher = new IndexSearcher(directory, true)// read-only=true
    // Parse a simple query that searches for "text":
    QueryParser parser = new QueryParser("fieldname", analyzer);
    Query query = parser.parse("text");
@@ -68,12 +68,14 @@ to check if the results are what we expect):

+

The Lucene API is divided into several packages: