apache / apache/lucene

MoreLikeThis minimum should match query [LUCENE-6493]

Open
#7,552 0 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Minor module:core/search type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

When performing MoreLikeThis queries we have a lot of parameters at hand in order to finetune the results. However, one thing I personally missed, being able to set a minimum of matching terms.

The advantage of this parameter is that Lucene will retrieve only the documents which have at least the given number of matching terms and you won't get any results of just one or two keyword matches when you are looking for documents that have more than a few matching interesting keywords.

An example:

doc1: lucene
doc2: lucene release
doc3: apache
doc4: apache lucene
doc5: apache lucene release

Let's say the query is "apache lucene release" and you set the minimum number of matching interesting terms to 2.

MoreLikeThis will return:
doc2, doc4 and doc5

Would you set it to 3, it would return just doc5.

---
Migrated from [LUCENE-6493](https://issues.apache.org/jira/browse/LUCENE-6493) by Jeroen Steggink, updated Jun 10 2015
Attachments: [LUCENE-6493.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-6493/LUCENE-6493.patch)

Contributor guide

Open the contributing guide

Research direction

Start at the MoreLikeThis entry point and review how its existing query parameters determine matching terms. Use the documented apache/lucene/release example to verify that a minimum of 2 returns doc2, doc4, and doc5, while 3 returns only doc5.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.