apache / apache/lucene

More Like This Class Structure Refactor [LUCENE-7802]

Open
#8,853 0 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Currently the MoreLikeThis is a giant monolithic class, difficult to maintain.
Scope of this issue is to refactor the code, separating responsibilities of the main components and funcitonality :

- **MoreLikeThis facade** - the entry point
- **MoreLikeThisParams** - the huge set of params and defaults provided for the More Like This
- **Interesting Terms Retriever** - given a document in input this component has the responsibility of identifying interesting terms
- **Term Scorer** - given a term with document stats and collection stats, this module has the responsibility to score the term
- **Query Builder** - given a set of params and interesting terms, this component has the responsibility to build the Lucene query

---
Migrated from [LUCENE-7802](https://issues.apache.org/jira/browse/LUCENE-7802) by Alessandro Benedetti (@alessandrobenedetti), 1 vote, updated May 01 2018
Linked issues:
- #9373
- #8549

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing MoreLikeThis implementation and the linked issues #9373 and #8549. Map the current responsibilities against the proposed MoreLikeThis facade, MoreLikeThisParams, Interesting Terms Retriever, Term Scorer, and Query Builder; the refactor is done when these responsibilities are separated while preserving the existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.