ok fieldToReader is used for other things, ill modify the patch to just not add to 'fields'. Thats what counts here.
As far as the test, since its only doing a basic add of documents the "bogus" assert maybe should stay? I dont see any reason why its fieldsEnum should get fields with empty terms for this test, but at least ill add a comment. On Tue, Feb 21, 2012 at 4:49 AM, Robert Muir <[email protected]> wrote: > Both ParallelAtomicReader and this test are buggy in my opinion :) > > On one hand, the test should realize that fieldsEnum might return > fields where terms is null (FieldsEnum documents this!) > > On the other hand, ParallelAtomicReader shouldn't add non-indexed > fields into its map, because thats wasteful: > > Index: src/java/org/apache/lucene/index/ParallelAtomicReader.java > =================================================================== > --- src/java/org/apache/lucene/index/ParallelAtomicReader.java (revision > 1291672) > +++ src/java/org/apache/lucene/index/ParallelAtomicReader.java (working copy) > @@ -105,8 +105,10 @@ > // NOTE: first reader having a given field "wins": > if (!fieldToReader.containsKey(fieldInfo.name)) { > fieldInfos.add(fieldInfo); > - fieldToReader.put(fieldInfo.name, reader); > - this.fields.addField(fieldInfo.name, reader.terms(fieldInfo.name)); > + if (fieldInfo.isIndexed) { > + fieldToReader.put(fieldInfo.name, reader); > + this.fields.addField(fieldInfo.name, > reader.terms(fieldInfo.name)); > + } > } > } > } > > > > On Mon, Feb 20, 2012 at 11:30 PM, Apache Jenkins Server > <[email protected]> wrote: >> Build: https://builds.apache.org/job/Lucene-trunk/1835/ >> >> 1 tests failed. >> REGRESSION: org.apache.lucene.search.TestTermVectors.testKnownSetOfDocuments >> >> Error Message: >> null >> >> Stack Trace: >> junit.framework.AssertionFailedError >> at >> org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:165) >> at >> org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:57) >> at >> org.apache.lucene.search.TestTermVectors.testKnownSetOfDocuments(TestTermVectors.java:259) >> at >> org.apache.lucene.util.LuceneTestCase$SubclassSetupTeardownRule$1.evaluate(LuceneTestCase.java:705) >> at >> org.apache.lucene.util.LuceneTestCase$InternalSetupTeardownRule$1.evaluate(LuceneTestCase.java:604) >> at >> org.apache.lucene.util.LuceneTestCase$TestResultInterceptorRule$1.evaluate(LuceneTestCase.java:509) >> at >> org.apache.lucene.util.LuceneTestCase$RememberThreadRule$1.evaluate(LuceneTestCase.java:567) >> >> >> >> >> Build Log (for compile errors): >> [...truncated 13502 lines...] >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] > > > > -- > lucidimagination.com -- lucidimagination.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
