lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Parks" <>
Subject RE: MoreLikeThis only returns 1 result
Date Fri, 28 Dec 2012 04:58:24 GMT
Ok, that worked, I had the /mlt request handler misconfigured (forgot a
'/'). It's working now. Thanks!

-----Original Message-----
From: Jack Krupansky [] 
Sent: Friday, December 28, 2012 11:38 AM
Subject: Re: MoreLikeThis only returns 1 result

Sounds like it is simply dispatching to the normal search request handler. 
Although you specified qt=mlt, make sure you enable the legacy select
handler dispatching in solrconfig.xml.


    <requestDispatcher handleSelect="false" >


    <requestDispatcher handleSelect="true" >

Or, simply address the MLT handler directly:

Or, use the MoreLikeThis search component:



-- Jack Krupansky

-----Original Message-----
From: David Parks
Sent: Thursday, December 27, 2012 9:59 PM
Subject: MoreLikeThis only returns 1 result

I'm doing a query like this for MoreLikeThis, sending it a document ID. But
the only result I ever get back is the document ID I sent it. The debug
response is below.

If I read it correctly, it's taking "id:1004401713626" as the term (not the
document ID) and only finding it once. But I want it to match the document
with ID 1004401713626 of course. I tried &q=id[1004410713626], but that
generates an exception:

Caused by: org.apache.lucene.queryParser.ParseException: Cannot parse
'id:[1004401713626]': Encountered " "]" "] "" at line 1, column 17.
Was expecting one of:
    "TO" ...
    <RANGEIN_GOOP> ...

This must be easy, but the documentation is minimal.

My Query:[1004401713626]&rows=10&

  <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">1</int>
    <lst name="params">
      <str name="mlt.mindf">5</str>
      <str name="mlt.fl">
      <str name="mlt.boost">false</str>
      <str name="debugQuery">true</str>
      <str name="q">id:1004401713626</str>
      <str name="mlt.mintf">2</str>
      <str name="mlt.maxqt">100</str>
      <str name="qt">mlt</str>
      <str name="rows">10</str>
    <result name="response" numFound="1" start="0">
        <long name="facetime">0</long>
        <str name="id">1004401713626</str>
    <lst name="debug">
      <str name="rawquerystring">id:1004401713626</str>
      <str name="querystring">id:1004401713626</str>
      <str name="parsedquery">id:1004401713626</str>
      <str name="parsedquery_toString">id:1004401713626</str>
      <lst name="explain">
        <str name="1004401713626">
18.29481 = (MATCH) fieldWeight(id:1004401713626 in 2843152), product of: 1.0
= tf(termFreq(id:1004401713626)=1) 18.29481 = idf(docFreq=1,
maxDocs=64873893) 1.0 = fieldNorm(field=id, doc=2843152) </str>

View raw message