lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-7354) MoreLikeThis incorrectly does toString on Field object
Date Fri, 01 Jul 2016 16:56:11 GMT

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

Grant Ingersoll commented on LUCENE-7354:
-----------------------------------------

I think the culprit is in RealTimeGetComponent.java, circa lines 278:
{code}
if (ids ==  null && allIds.length <= 1) {
     // if the doc was not found, then use a value of null.
     rsp.add("doc", docList.size() > 0 ? docList.get(0) : null);
   } else {
     docList.setNumFound(docList.size());
     rsp.addResponse(docList);
   }
{code}

When debugging the test class (CloudMLTQParserTest), we end up in the else clause.  When connecting
to standalone via curl (e.g. http://localhost:8983/solr/mlt/select?indent=on&q={!mlt%20qf=resourcename}ID&wt=json)),
we end up in the if clause.

Still debugging what is causing ids and allIds to be set in the former case and not in the
latter, as the query parameter looks almost identical.


> MoreLikeThis incorrectly does toString on Field object
> ------------------------------------------------------
>
>                 Key: LUCENE-7354
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7354
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 6.0.1, 5.5.1, master (7.0)
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>            Priority: Minor
>         Attachments: LUCENE-7354-mlt-fix
>
>
> In MoreLikeThis.java, circa line 763, when calling addTermFrequencies on a Field object,
we are incorrectly calling toString on the Field object, which puts the Field attributes (indexed,
stored, et. al) into the String that is returned.
> I'll put up a patch/fix shortly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message