[
https://issues.apache.org/jira/browse/SOLR-5351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16365277#comment-16365277
]
Dawid Weiss commented on SOLR-5351:
-----------------------------------
This issue is still present in all releases of Solr. When you use multiple
mlt.fl fields and a text stream on input, only the first field is taken into
account, with this comment in MoreLikeThisHandler:
{code}
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(mlt.getFieldNames()[0], reader);
{code}
It is stupid and trappy, I'd like to fix it. If there are any reasons to keep
this behavior for backward compatibility please let me know. I assume it's just
a bug (prevents you from using mlt.qf, etc.).
> 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
>
> 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 firs 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: [email protected]
For additional commands, e-mail: [email protected]