You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Dawid Weiss (JIRA)" <ji...@apache.org> on 2018/03/01 13:18:00 UTC

[jira] [Commented] (SOLR-5351) More Like This Handler uses only first field in mlt.fl when using stream.body

    [ https://issues.apache.org/jira/browse/SOLR-5351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16381978#comment-16381978 ] 

Dawid Weiss commented on SOLR-5351:
-----------------------------------

I implemented support for multiple fields in the MLT handler. I also corrected the test which had bugs in it (expected exception block was not guarded and always falling through, effectively verifying nothing). I also cleaned up the code formatting a bit; this will obscure the patch slightly, but shouldn't be too bad.

If there are no objections, I'd like to commit it in soon.

> More Like This Handler uses only first field in mlt.fl when using stream.body
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-5351
>                 URL: https://issues.apache.org/jira/browse/SOLR-5351
>             Project: Solr
>          Issue Type: Bug
>          Components: MoreLikeThis
>    Affects Versions: 4.4
>         Environment: Linux,Windows
>            Reporter: Zygmunt Wiercioch
>            Assignee: Tommaso Teofili
>            Priority: Minor
>         Attachments: SOLR-5351.patch
>
>
> The documentation at: http://wiki.apache.org/solr/MoreLikeThisHandler indicates that one can use multiple fields for similarity in mlt.fl:
> http://localhost:8983/solr/mlt?stream.body=electronics%20memory&mlt.fl=manu,cat&mlt.interestingTerms=list&mlt.mintf=0
> In trying this, only one field is used. 
> Looking at the code, it only looks at the first field:
>  public DocListAndSet getMoreLikeThis( Reader reader, int start, int rows, List<Query> filters, List<InterestingTerm> terms, int flags ) throws IOException
>     {
>       // analyzing with the first field: previous (stupid) behavior
>       rawMLTQuery = mlt.like(reader, mlt.getFieldNames()[0]); 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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