Skip to content

[BUG] SSDV.nextOrd() should not make use of NO_MORE_DOCS #17628

Closed
@rishabhmaurya

Description

@rishabhmaurya

Describe the bug

Lucene 10 makes it illegal to call SortedSetDocValues#nextOrd() more than#docValueCount() times for the currently-positioned doc.
https://github.com/apache/lucene/blob/e7f9bc837e419672d9bfc829d01e643df667e9d4/lucene/core/src/java/org/apache/lucene/index/SortedSetDocValues.java#L36

Remove all occurrences of SSDV.nextOrd() != NO_MORE_DOCS and replace with use of SSDV.docValuesCount() like in #17626

I consider this as a blocker to OpenSearch 3.0 which is making use of lucene 10.

Related component

Search

To Reproduce

This was causing flakiness in MultiOrdinalsTests as encountered in PR #17446 with failure https://build.ci.opensearch.org/job/gradle-check/54686/testReport/junit/org.opensearch.index.fielddata.ordinals/MultiOrdinalsTests/testRandomValues/

Expected behavior

Remove all occurrences of SSDV.nextOrd() != NO_MORE_DOCS and replace with use of SSDV.docValuesCount()

Additional Details

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinguntriagedv3.0.0Issues and PRs related to version 3.0.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions