Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
New
Description
This test runs failed.
public void testDocValueCount() throws IOException { try (Directory d = newDirectory()) { try (IndexWriter w = new IndexWriter(d, new IndexWriterConfig())) { for (int j = 0; j < 1; j++) { Document doc = new Document(); doc.add(new SortedSetDocValuesField("field", new BytesRef("a"))); doc.add(new SortedSetDocValuesField("field", new BytesRef("a"))); doc.add(new SortedSetDocValuesField("field", new BytesRef("b"))); w.addDocument(doc); } } try (IndexReader reader = DirectoryReader.open(d)) { assertEquals(1, reader.leaves().size()); for (LeafReaderContext leaf : reader.leaves()) { SortedSetDocValues docValues= leaf.reader().getSortedSetDocValues("field") ; for (int doc1 = docValues.nextDoc(); doc1 != DocIdSetIterator.NO_MORE_DOCS; doc1 = docValues.nextDoc()) { assert docValues.docValueCount() > 0; } } } } }