apache / apache/lucene

Reusing SimpleTVPostingsEnum instance instead of creating new one.

Open Beginner friendly
#16,310 0 comments 0 reactions 0 assignees View on GitHub
type:enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.