dnaber 2004/08/30 13:56:04 Modified: src/test/org/apache/lucene/document TestDocument.java Log: stop using the deprecated Field constructor; small doc cleanup to avoid warnings Revision Changes Path 1.5 +7 -9 jakarta-lucene/src/test/org/apache/lucene/document/TestDocument.java Index: TestDocument.java =================================================================== RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/document/TestDocument.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- TestDocument.java 20 Apr 2004 17:26:16 -0000 1.4 +++ TestDocument.java 30 Aug 2004 20:56:04 -0000 1.5 @@ -14,8 +14,6 @@ import org.apache.lucene.search.Searcher; import org.apache.lucene.search.Hits; -import java.io.IOException; - /** * Copyright 2004 The Apache Software Foundation * @@ -42,7 +40,7 @@ { /** - * Tests [EMAIL PROTECTED] Document#remove()} method for a brand new Document + * Tests [EMAIL PROTECTED] Document#removeField(String)} method for a brand new Document * that has not been indexed yet. * * @throws Exception on error @@ -73,7 +71,7 @@ } /** - * Tests [EMAIL PROTECTED] Document#getValues()} method for a brand new Document + * Tests [EMAIL PROTECTED] Document#getValues(String)} method for a brand new Document * that has not been indexed yet. * * @throws Exception on error @@ -84,7 +82,7 @@ } /** - * Tests [EMAIL PROTECTED] Document#getValues()} method for a Document retrieved from + * Tests [EMAIL PROTECTED] Document#getValues(String)} method for a Document retrieved from * an index. * * @throws Exception on error @@ -120,13 +118,13 @@ } } - private Document makeDocumentWithFields() throws IOException + private Document makeDocumentWithFields() { Document doc = new Document(); doc.add(Field.Keyword( "keyword", "test1")); doc.add(Field.Keyword( "keyword", "test2")); - doc.add(Field.Text( "text", "test1")); - doc.add(Field.Text( "text", "test2")); + doc.add(new Field( "text", "test1", Field.Store.YES, Field.Index.TOKENIZED)); + doc.add(new Field( "text", "test2", Field.Store.YES, Field.Index.TOKENIZED)); doc.add(Field.UnIndexed("unindexed", "test1")); doc.add(Field.UnIndexed("unindexed", "test2")); doc.add(Field.UnStored( "unstored", "test1"));
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]