lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrés Cobas (JIRA) <j...@apache.org>
Subject [jira] [Created] (SOLR-2734) MoreLikeThisHandler does not include debugging info
Date Mon, 29 Aug 2011 15:56:41 GMT
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.3, 3.2, 3.1
         Environment: All
            Reporter: Andrés Cobas


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