ASF GitHub Bot commented on SOLR-9644:

GitHub user EreMaijala opened a pull request:


    SOLR-9644: Fix boost handling in SimpleMLTQParser and CloudMLTQParser.

    Both parsers tried to handle field boosts but didn't do it properly. This 
pull request includes the following changes to both:
    - Parse boosts from qf even if boost=false to avoid errors.
    - Use the field names from the boost parsing so that they are always clean.
    - Add tests for the same query with and without boosting.
    Also fixed is an additional problem in CloudMLTQParser where it added 
IndexableField type fields to the filtered document as is, which caused the 
document to include field definition strings such as "stored" and "indexed". 
This caused the MLT query to return records including these terms under some 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/EreMaijala/lucene-solr master

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #98
commit 70ad5ccbb4a5b39b16f41c58dd5ee058811b6d9c
Author: Ere Maijala <ere.maij...@helsinki.fi>
Date:   2016-10-17T07:02:40Z

    SOLR-9644 Fixed SimpleMLTQParser and CloudMLTQParser to handle boosts 
properly and CloudMLTQParser to only extract actual values from IndexableField 
type fields to the filtered document.

commit e10b9385df5c3183e80ed084fa48b0c4da9dd476
Author: Ere Maijala <ere.maij...@helsinki.fi>
Date:   2016-10-17T07:30:36Z

    Improved the SimpleMLTQParserTest test case so that it actually shows a 
difference in results when boosting is used.


> MoreLikeThis parser doesn't handle boosts properly
> --------------------------------------------------
>                 Key: SOLR-9644
>                 URL: https://issues.apache.org/jira/browse/SOLR-9644
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: MoreLikeThis
>    Affects Versions: 6.2.1
>            Reporter: Ere Maijala
> It seems SimpleMLTQParser and CouldMLTQParser should be able to handle boost 
> parameters, but it's not working properly. I'll make a pull request to add 
> tests and fix both.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to