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

Shawn Heisey commented on SOLR-4414:
------------------------------------

bq. The sub searches are hitting the /select handler unless you use shards.qt

I am using shards.qt, but I can see in the log that it's hitting /select ... so 
perhaps one problem is that the MoreLikeThisHandler is ignoring shards.qt.  
Even if that's fixed, I'm still not sure it'll work.  See below.

Here's the results of my testing with just using the MoreLikeThisComponent 
using a handler called /search.  I manually included shards.qt, but it is also 
included in the handler definition.  I removed the one document from the 
results and redacted my domain name, but left the rest of the response as-is.  
This time I can see the distributed requests hitting /search like they're 
supposed to, but still no results.  The QTime on this suggests that it's 
actually doing the work:

{code}
<?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">6198</int>
  <lst name="params">
    <str name="shards.qt">/search</str>
    <str name="spellcheck.extendedResults">false</str>
    <str name="spellcheck.maxCollationTries">2</str>
    <str name="spellcheck.maxCollations">5</str>
    <str name="spellcheck.maxCollationEvaluations">2</str>
    <str name="shards.tolerant">true</str>
    <str name="rows">70</str>
    <str name="spellcheck.onlyMorePopular">false</str>
    <str name="echoParams">all</str>
    <str name="df">catchall</str>
    <str 
name="shards">bigindy5.REDACTED.com:8982/solr/inclive,bigindy5.REDACTED.com:8982/solr/s0live,bigindy5.REDACTED.com:8982/solr/s1live,bigindy5.REDACTED.com:8982/solr/s2live,bigindy5.REDACTED.com:8982/solr/s3live,bigindy5.REDACTED.com:8982/solr/s4live,bigindy5.REDACTED.com:8982/solr/s5live</str>
    <str name="shards.info">true</str>
    <str name="spellcheck.dictionary">default</str>
    <str name="q.op">AND</str>
    <str name="spellcheck.count">9</str>
    <str name="mlt.count">100</str>
    <str name="mlt.fl">catchall</str>
    <str name="indent">true</str>
    <str name="shards.qt">/search</str>
    <str name="q">tag_id:efespphotos531595</str>
    <str name="mlt">true</str>
    <str name="wt">xml</str>
  </lst>
</lst>
<lst name="shards.info">
  <lst name="bigindy5.REDACTED.com:8982/solr/s0live">
    <long name="numFound">0</long>
    <float name="maxScore">0.0</float>
    <long name="time">15</long>
  </lst>
  <lst name="bigindy5.REDACTED.com:8982/solr/s1live">
    <long name="numFound">0</long>
    <float name="maxScore">0.0</float>
    <long name="time">15</long>
  </lst>
  <lst name="bigindy5.REDACTED.com:8982/solr/s4live">
    <long name="numFound">0</long>
    <float name="maxScore">0.0</float>
    <long name="time">6</long>
  </lst>
  <lst name="bigindy5.REDACTED.com:8982/solr/s2live">
    <long name="numFound">0</long>
    <float name="maxScore">0.0</float>
    <long name="time">6</long>
  </lst>
  <lst name="bigindy5.REDACTED.com:8982/solr/s5live">
    <long name="numFound">0</long>
    <float name="maxScore">0.0</float>
    <long name="time">3</long>
  </lst>
  <lst name="bigindy5.REDACTED.com:8982/solr/s3live">
    <long name="numFound">0</long>
    <float name="maxScore">0.0</float>
    <long name="time">5</long>
  </lst>
  <lst name="bigindy5.REDACTED.com:8982/solr/inclive">
    <long name="numFound">1</long>
    <float name="maxScore">12.94707</float>
    <long name="time">37</long>
  </lst>
</lst>
<result name="response" numFound="1" start="0" maxScore="12.94707">
  <doc>
.....</doc>
</result>
<lst name="moreLikeThis">
  <result name="efespphotos531595" numFound="0" start="0" maxScore="0.0">
  </result>
</lst>
</response>
{code}

In addition to the distributed requests with the mlt parameters, the log also 
shows this seven times:

INFO  - 2013-02-07 12:51:51.036; 
org.apache.solr.handler.component.MoreLikeThisComponent; MLT: results added for 
key: efespphotos531595 documents: {numFound=0,start=0,maxScore=0.0,docs=[]}

I also tried sending the request to /select, which is configured identically to 
/search except that shards.qt is not present.

One other potential factor: my uniqueKey field is not id, it's tag_id.  I don't 
have a field named id.

                
> MoreLikeThis on a shard finds no interesting terms if the document queried is 
> not in that shard
> -----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-4414
>                 URL: https://issues.apache.org/jira/browse/SOLR-4414
>             Project: Solr
>          Issue Type: Bug
>          Components: MoreLikeThis, SolrCloud
>    Affects Versions: 4.1
>            Reporter: Colin Bartolome
>
> Running a MoreLikeThis query in a cloud works only when the document being 
> queried exists in whatever shard serves the request. If the document is not 
> present in the shard, no "interesting terms" are found and, consequently, no 
> matches are found.
> h5. Steps to reproduce
> * Edit example/solr/collection1/conf/solrconfig.xml and add this line, with 
> the rest of the request handlers:
> {code:xml}
> <requestHandler name="/mlt" class="solr.MoreLikeThisHandler" />
> {code}
> * Follow the [simplest SolrCloud 
> example|http://wiki.apache.org/solr/SolrCloud#Example_A:_Simple_two_shard_cluster]
>  to get two shards running.
> * Hit this URL: 
> [http://localhost:8983/solr/collection1/mlt?mlt.fl=includes&q=id:3007WFP&mlt.match.include=false&mlt.interestingTerms=list&mlt.mindf=1&mlt.mintf=1]
> * Compare that output to that of this URL: 
> [http://localhost:7574/solr/collection1/mlt?mlt.fl=includes&q=id:3007WFP&mlt.match.include=false&mlt.interestingTerms=list&mlt.mindf=1&mlt.mintf=1]
> The former URL will return a result and list some interesting terms. The 
> latter URL will return no results and list no interesting terms. It will also 
> show this odd XML element:
> {code:xml}
> <null name="response"/>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to