apache / apache/lucene

Move anonymous Weight implementation in PointRangeQuery to named class

Open
#13,710 3 comments 0 reactions 0 assignees View on GitHub
type:task
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

### Description

The `Weight` implementation in `PointRangeQuery#createWeight` is anonymous class making it difficult to extend or reuse specific logic from the class. Not to mention the class being more ~400 lines of code which makes good case for named class anyways IMO.

Contributor guide

Open the contributing guide

Research direction

Start at PointRangeQuery#createWeight and inspect the anonymous Weight implementation, which is described as roughly 400 lines and contains the logic to reuse. Extract it into a named class while preserving the current behavior, then run the existing tests covering PointRangeQuery to confirm the refactor is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.