Reusing SimpleTVPostingsEnum instance instead of creating new one.
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
### Description
Hello everyone,
I was going through the code of lucene and found a small #TODO where we are creating a new class instance instead of reusing an old variable.
https://github.com/apache/lucene/blob/b843b4c6c395cff92b72997c8f59b0579d68365d/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextTermVectorsReader.java#L411
I thought why not make a first contribution and learn something new.
Contributor guide
Research direction
Read lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextTermVectorsReader.java around line 411 and inspect the TODO and surrounding variable usage. Run the relevant Lucene tests for the simpletext term-vectors reader; done means the existing SimpleTVPostingsEnum is reused and the tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100