Fields.size() should not return -1 [LUCENE-8029]
Open
legacy-jira-priority:Minor
type:enhancement
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
All call sites of Fields.size() recompute it if it is not available. We should make the API easier to use and require that it never returns -1.
---
Migrated from [LUCENE-8029](https://issues.apache.org/jira/browse/LUCENE-8029) by Adrien Grand (@jpountz)
Contributor guide
Research direction
Start by locating the Fields.size() API, its implementations, and the call sites that currently recompute the value when it is -1. Review how each implementation determines the field count and update the affected callers so the API never returns -1; done means all relevant tests and call sites reflect that contract.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100