Apache Solr open-source search software
adding setMaxFieldLength() to the example; Jakarta -> Apache
Daniel Naber30051ef3b576
diff --git a/src/java/overview.html b/src/java/overview.htmlindex 4a1206bca65..56fea571449 100644--- a/src/java/overview.html+++ b/src/java/overview.html@@ -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 JUnitto check if the results are what we expect):</p>@@ -27,6 +27,7 @@ to check if the results are what we expect):</p><font color="#ffffff"> </font><font color="#3f7f5f">// if one exists):</font><br/><font color="#ffffff"> </font><font color="#3f7f5f">//Directory directory = FSDirectory.getDirectory("/tmp/testindex", true);</font><br/><font color="#ffffff"> </font><font color="#000000">IndexWriter iwriter = </font><font color="#7f0055"><b>new </b></font><font color="#000000">IndexWriter</font><font color="#000000">(</font><font color="#000000">directory, analyzer, </font><font color="#7f0055"><b>true</b></font><font color="#000000">)</font><font color="#000000">;</font><br/>+<font color="#ffffff"> </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"> </font><font color="#000000">Document doc = </font><font color="#7f0055"><b>new </b></font><font color="#000000">Document</font><font color="#000000">()</font><font color="#000000">;</font><br/><font color="#ffffff"> </font><font color="#000000">String text = </font><font color="#2a00ff">"This is the text to be indexed."</font><font color="#000000">;</font><br/><font color="#ffffff"> </font><font color="#000000">doc.add</font><font color="#000000">(</font><font color="#7f0055"><b>new </b></font><font color="#000000">Field</font><font color="#000000">(</font><font color="#2a00ff">"fieldname"</font><font color="#000000">, text, Field.Store.YES,</font><br/>diff --git a/src/test/org/apache/lucene/TestDemo.java b/src/test/org/apache/lucene/TestDemo.javaindex f408154c233..c420b879405 100644--- a/src/test/org/apache/lucene/TestDemo.java+++ b/src/test/org/apache/lucene/TestDemo.java@@ -51,6 +51,7 @@ public class TestDemo extends TestCase {// 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,