LUCENE-1084: fix some more deprecated IndexWriter instantiations in unit tests

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@618607 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2008-02-05 11:12:53 +00:00
parent 140a867933
commit 59c76d2f47
3 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ class SearchTestForDuplicates {
try {
Directory directory = new RAMDirectory();
Analyzer analyzer = new SimpleAnalyzer();
IndexWriter writer = new IndexWriter(directory, analyzer, true);
IndexWriter writer = new IndexWriter(directory, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
final int MAX_DOCS = 225;

View File

@ -91,7 +91,7 @@ public class TestMergeSchedulerExternal extends LuceneTestCase {
Field idField = new Field("id", "", Field.Store.YES, Field.Index.UN_TOKENIZED);
doc.add(idField);
IndexWriter writer = new IndexWriter(dir, true, new WhitespaceAnalyzer(), true);
IndexWriter writer = new IndexWriter(dir, true, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
MyMergeScheduler ms = new MyMergeScheduler();
writer.setMergeScheduler(ms);
writer.setMaxBufferedDocs(2);

View File

@ -40,7 +40,7 @@ public class TestKeywordAnalyzer extends LuceneTestCase {
directory = new RAMDirectory();
IndexWriter writer = new IndexWriter(directory,
new SimpleAnalyzer(),
true);
true, IndexWriter.MaxFieldLength.LIMITED);
Document doc = new Document();
doc.add(new Field("partnum", "Q36", Field.Store.YES, Field.Index.UN_TOKENIZED));
@ -67,7 +67,7 @@ public class TestKeywordAnalyzer extends LuceneTestCase {
public void testMutipleDocument() throws Exception {
RAMDirectory dir = new RAMDirectory();
IndexWriter writer = new IndexWriter(dir,new KeywordAnalyzer(), true);
IndexWriter writer = new IndexWriter(dir,new KeywordAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
Document doc = new Document();
doc.add(new Field("partnum", "Q36", Field.Store.YES, Field.Index.TOKENIZED));
writer.addDocument(doc);