[
https://issues.apache.org/jira/browse/LUCENE-10598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adrien Grand resolved LUCENE-10598.
-----------------------------------
Fix Version/s: 9.3
Resolution: Fixed
> SortedSetDocValues#docValueCount() should be always greater than zero
> ---------------------------------------------------------------------
>
> Key: LUCENE-10598
> URL: https://issues.apache.org/jira/browse/LUCENE-10598
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Lu Xugang
> Priority: Major
> Fix For: 9.3
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> This test runs failed.
> {code:java}
> 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;
> }
> }
> }
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]