mirror of https://github.com/apache/lucene.git
don't add unindexed fields to fieldsenum
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1291679 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ceb3ab3e1d
commit
19c3b1220b
|
@ -106,7 +106,9 @@ public final class ParallelAtomicReader extends AtomicReader {
|
|||
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) {
|
||||
this.fields.addField(fieldInfo.name, reader.terms(fieldInfo.name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ public class TestTermVectors extends LuceneTestCase {
|
|||
DocsEnum docs = null;
|
||||
while(fields.next() != null) {
|
||||
Terms terms = fields.terms();
|
||||
assertNotNull(terms);
|
||||
assertNotNull(terms); // NOTE: kinda sketchy assumptions, but ideally we would fix fieldsenum api...
|
||||
TermsEnum termsEnum = terms.iterator(null);
|
||||
|
||||
while (termsEnum.next() != null) {
|
||||
|
|
Loading…
Reference in New Issue