mirror of https://github.com/apache/lucene.git
don't close reader prematurely
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@997230 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
774eaeada0
commit
76a9dc048c
|
@ -171,7 +171,6 @@ public class TestHighFreqTerms extends LuceneTestCase {
|
|||
termsWithTF[i].totalTermFreq);
|
||||
}
|
||||
}
|
||||
reader.close();
|
||||
}
|
||||
|
||||
/********************Tests for getTotalTermFreq**********************************/
|
||||
|
@ -181,7 +180,6 @@ public class TestHighFreqTerms extends LuceneTestCase {
|
|||
BytesRef termtext = new BytesRef (term);
|
||||
String field = "FIELD_1";
|
||||
long totalTermFreq = HighFreqTerms.getTotalTermFreq(reader, field, termtext);
|
||||
reader.close();
|
||||
assertEquals("highTf tf should be 200",200,totalTermFreq);
|
||||
|
||||
}
|
||||
|
@ -191,7 +189,6 @@ public class TestHighFreqTerms extends LuceneTestCase {
|
|||
BytesRef termtext = new BytesRef (term);
|
||||
String field = "FIELD_1";
|
||||
long totalTermFreq = HighFreqTerms.getTotalTermFreq(reader, field, termtext);
|
||||
reader.close();
|
||||
assertEquals("totalTermFreq should be 0 for term not in index",0,totalTermFreq);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue