[ 
https://issues.apache.org/jira/browse/SOLR-2734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hoss Man updated SOLR-2734:
---------------------------

    Fix Version/s: 3.4
         Assignee: Koji Sekiguchi

This looks like a minor mistake introduced when SOLR-860 was backported to 3x 
... simple enough to fix i suppose, but what alarms me is that we have a 
MoreLikeThisHandlerTest that explicitly tests if it gets debug output when 
using the MLT Handler, and it seems to be working on the 3x branch.

I'm hoping Koji can chime in here with some idea as to why the test is working 
even though the code is clearly a typo?

> MoreLikeThisHandler does not include debugging info
> ---------------------------------------------------
>
>                 Key: SOLR-2734
>                 URL: https://issues.apache.org/jira/browse/SOLR-2734
>             Project: Solr
>          Issue Type: Bug
>          Components: MoreLikeThis
>    Affects Versions: 3.1, 3.2, 3.3
>         Environment: All
>            Reporter: Andrés Cobas
>            Assignee: Koji Sekiguchi
>             Fix For: 3.4
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> After upgrading to solr 3.3.0 from 1.4.0, I noticed that I couldn't get the 
> MoreLikeThisHandler to return debugging data. I tried the debug parameters  
> debugQuery and debug, but all I got was:
>  <bool name="debug">true</bool>
> I took a look at the code for the MoreLikeThisHandler, and noted in the 
> debbuging part that the handler is adding the variable dbg to the response 
> (line 211):
> {quote} rsp.add("debug", dbg);{quote}
> Such variable is created at line 197:
> {quote}boolean dbg = req.getParams().getBool(CommonParams.DEBUG_QUERY, 
> false);{quote}
> I suppose the correct variable to add to the response would be dbgInfo:
> {quote}NamedList<Object> dbgInfo = SolrPluginUtils.doStandardDebug(req, q, 
> mlt.getRawMLTQuery(), mltDocs.docList);
>         if (null != dbgInfo) {
>           if (null != filters) {
>             
> dbgInfo.add("filter_queries",req.getParams().getParams(CommonParams.FQ));
>             List<String> fqs = new ArrayList<String>(filters.size());
>             for (Query fq : filters) {
>               fqs.add(QueryParsing.toString(fq, req.getSchema()));
>             }
>             dbgInfo.add("parsed_filter_queries",fqs);
>           }
> {quote}
> Summarizing, i believe line 211 should be changed to:
> {quote}
> rsp.add("debug", dbgInfo);
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to