You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by dn...@apache.org on 2005/05/24 20:53:22 UTC

svn commit: r178245 - in /lucene/java/trunk/src: java/overview.html test/org/apache/lucene/TestDemo.java

Author: dnaber
Date: Tue May 24 11:53:21 2005
New Revision: 178245

URL: http://svn.apache.org/viewcvs?rev=178245&view=rev
Log:
adding setMaxFieldLength() to the example; Jakarta -> Apache

Modified:
    lucene/java/trunk/src/java/overview.html
    lucene/java/trunk/src/test/org/apache/lucene/TestDemo.java

Modified: lucene/java/trunk/src/java/overview.html
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/overview.html?rev=178245&r1=178244&r2=178245&view=diff
==============================================================================
--- lucene/java/trunk/src/java/overview.html (original)
+++ lucene/java/trunk/src/java/overview.html Tue May 24 11:53:21 2005
@@ -1,10 +1,10 @@
 <html>
 <head>
-   <title>Jakarta Lucene API</title>
+   <title>Apache Lucene API</title>
 </head>
 <body>
 
-<p>Jakarta Lucene is a high-performance, full-featured text search engine library.
+<p>Apache Lucene is a high-performance, full-featured text search engine library.
 Here's a simple example how to use Lucene for indexing and searching (using JUnit
 to check if the results are what we expect):</p>
 
@@ -27,6 +27,7 @@
 <font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//&nbsp;if&nbsp;one&nbsp;exists):</font><br/>
 <font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#3f7f5f">//Directory&nbsp;directory&nbsp;=&nbsp;FSDirectory.getDirectory(&#34;/tmp/testindex&#34;,&nbsp;true);</font><br/>
 <font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">IndexWriter&nbsp;iwriter&nbsp;=&nbsp;</font><font color="#7f0055"><b>new&nbsp;</b></font><font color="#000000">IndexWriter</font><font color="#000000">(</font><font color="#000000">directory,&nbsp;analyzer,&nbsp;</font><font color="#7f0055"><b>true</b></font><font color="#000000">)</font><font color="#000000">;</font><br/>
+<font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">iwriter.setMaxFieldLength</font><font color="#000000">(</font><font color="#990000">25000</font><font color="#000000">)</font><font color="#000000">;</font><br/>
 <font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">Document&nbsp;doc&nbsp;=&nbsp;</font><font color="#7f0055"><b>new&nbsp;</b></font><font color="#000000">Document</font><font color="#000000">()</font><font color="#000000">;</font><br/>
 <font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">String&nbsp;text&nbsp;=&nbsp;</font><font color="#2a00ff">&#34;This&nbsp;is&nbsp;the&nbsp;text&nbsp;to&nbsp;be&nbsp;indexed.&#34;</font><font color="#000000">;</font><br/>
 <font color="#ffffff">&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#000000">doc.add</font><font color="#000000">(</font><font color="#7f0055"><b>new&nbsp;</b></font><font color="#000000">Field</font><font color="#000000">(</font><font color="#2a00ff">&#34;fieldname&#34;</font><font color="#000000">,&nbsp;text,&nbsp;Field.Store.YES,</font><br/>

Modified: lucene/java/trunk/src/test/org/apache/lucene/TestDemo.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/test/org/apache/lucene/TestDemo.java?rev=178245&r1=178244&r2=178245&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/TestDemo.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/TestDemo.java Tue May 24 11:53:21 2005
@@ -51,6 +51,7 @@
     // if one exists):
     //Directory directory = FSDirectory.getDirectory("/tmp/testindex", true);
     IndexWriter iwriter = new IndexWriter(directory, analyzer, true);
+    iwriter.setMaxFieldLength(25000);
     Document doc = new Document();
     String text = "This is the text to be indexed.";
     doc.add(new Field("fieldname", text, Field.Store.YES,