apache / apache/lucene

MLT queries ignore custom term frequencies [LUCENE-8756]

Open
#9,801 12 comments 0 reactions 0 assignees View on GitHub
affects-version:7.0 affects-version:7.0.1 affects-version:7.1 affects-version:7.2 affects-version:7.2.1 affects-version:7.3 affects-version:7.3.1 affects-version:7.4 affects-version:7.5 affects-version:7.6 affects-version:7.7 affects-version:7.7.1 affects-version:8.0 legacy-jira-label:pull-request-available legacy-jira-priority:Major module:core/queryparser type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

The MLT queries ignore any custom term frequencies for the like-texts and uses a hard-coded frequency of 1 per occurrence. I have prepared a test-case to demonstrate the issue and a fix proposal https://github.com/ollik1/lucene-solr/commit/9dbbce2af26698cec1ac82a526d9cee60a880678

---
Migrated from [LUCENE-8756](https://issues.apache.org/jira/browse/LUCENE-8756) by Olli Kuonanoja, updated May 03 2019

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked test case and fix proposal, then locate the MoreLikeThis query implementation and its related tests. Confirm how custom term frequencies are passed for like-texts, and consider the work complete when a regression test shows those frequencies are respected instead of replacing each occurrence with frequency 1.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.