mikemccand / stargazers-migration-test

Testing Lucene's Jira -> GitHub issues migration
0 stars 0 forks source link

MLT queries ignore custom term frequencies [LUCENE-8756] #754

Open mikemccand opened 5 years ago

mikemccand commented 5 years ago

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


Legacy Jira details

LUCENE-8756 by Olli Kuonanoja on Apr 08 2019, updated May 03 2019

mikemccand commented 5 years ago

Here is a PR for the issue https://github.com/apache/lucene-solr/pull/638

[Legacy Jira: Olli Kuonanoja on Apr 08 2019]

mikemccand commented 5 years ago

Related to https://issues.apache.org/jira/browse/LUCENE-7854 @mikemccand what is your take on this?

[Legacy Jira: Olli Kuonanoja on Apr 28 2019]

mikemccand commented 5 years ago

Ahh thanks for the ping @ollik1 I agree we need to fix this; I'll have a look at the PR, thanks!

[Legacy Jira: Michael McCandless (@mikemccand) on Apr 29 2019]

mikemccand commented 5 years ago

The change looks good – I left a couple minor comments – kinda freaky how Jira now tracks and posts how long I spend looking at a GitHub PR ;)  Thanks @ollik1.

[Legacy Jira: Michael McCandless (@mikemccand) on Apr 30 2019]

mikemccand commented 5 years ago

Thank you @mikemccand, applied review fixes to the PR

[Legacy Jira: Olli Kuonanoja on Apr 30 2019]

mikemccand commented 5 years ago

Great, thanks @ollik1 – I'll push soon.

[Legacy Jira: Michael McCandless (@mikemccand) on Apr 30 2019]

mikemccand commented 5 years ago

Commit 4a76ad7263d8a112919fe007f19b71baafb169be in lucene-solr's branch refs/heads/master from Michael McCandless https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=4a76ad7

LUCENE-8756: add CHANGES entry

[Legacy Jira: ASF subversion and git services on Apr 30 2019]

mikemccand commented 5 years ago

Some commits were not reported because the commit message didn't mention the issue: https://github.com/apache/lucene-solr/commit/351e21f6203e8f3aece0cd5adf4049974bd2d636

BTW that commit now fails "ant precommit" although might not of at the time. Can you please fix this @mikemccand?

[forbidden-apis] Forbidden method invocation: java.lang.String#format(java.lang.String,java.lang.Object[]) [Uses default locale]
[forbidden-apis]   in org.apache.lucene.queries.mlt.TestMoreLikeThis (TestMoreLikeThis.java:497)

As an aside, I don't know why some devs like to call String.format in cases when simple/obvious string concatenation is equivalent.

[Legacy Jira: David Smiley (@dsmiley) on May 01 2019]

mikemccand commented 5 years ago

Commit 6842676952f15ee98c2ff9ef41b443a7134fa1b9 in lucene-solr's branch refs/heads/master from Christine Poerschke https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=6842676

LUCENE-8756: ant precommit (ant check-forbidden-apis) fix

[Legacy Jira: ASF subversion and git services on May 01 2019]

mikemccand commented 5 years ago

Ugh, sorry!  Thank you @cpoerschke!

[Legacy Jira: Michael McCandless (@mikemccand) on May 03 2019]

mikemccand commented 5 years ago

Commit 1b15f6e037a9ba663df0df0abcdca8476def6ea5 in lucene-solr's branch refs/heads/branch_8x from Michael McCandless https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=1b15f6e

LUCENE-8756: add CHANGES entry

[Legacy Jira: ASF subversion and git services on May 03 2019]

mikemccand commented 5 years ago

Commit c05501e5b279fad13f81279c341389ab7bebbff5 in lucene-solr's branch refs/heads/branch_8x from Michael McCandless https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=c05501e

LUCENE-8756: fix precommit failure

[Legacy Jira: ASF subversion and git services on May 03 2019]