lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koji Sekiguchi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-2734) MoreLikeThisHandler does not include debugging info
Date Fri, 02 Sep 2011 02:37:09 GMT

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

Koji Sekiguchi commented on SOLR-2734:
--------------------------------------

I committed the Andrés's fix in r1164331. Thanks Andrés!

bq. 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.

The test was also introduced in SOLR-860, but it confuses them. I've opened SOLR-2740.

> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message