You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2007/02/06 18:23:06 UTC

[jira] Commented: (SOLR-69) PATCH:MoreLikeThis support

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

Yonik Seeley commented on SOLR-69:
----------------------------------

Should this be an integrated part of the standard/dismax handlers, or should it be a separate request handler?
I guess the answer would depend on how it's used mos of the time:

Case 1)  
  The GUI queries the standard request handler and displays a list of documents with a little "more-like-this" button next to each document.  When pressed, the GUI queries the more-like-this handler with the specific document id, and then displays the results to the user.

Case 2)
  The GUI queries the standard request handler to display a list of documents, with a sub-list of similar "mlt" documents automatically displayed under each.  Or, those lists could be collapsed by default, but instantly displayed since the GUI already has the info.

If case (2) were rare, then perhaps mlt should be a separate handler.  Case (2) can still be done, it would just require more requests from the GUI to do it.

In either case, will highlighting be desired on any of the mlt docs?  Other thoughts?


> PATCH:MoreLikeThis support
> --------------------------
>
>                 Key: SOLR-69
>                 URL: https://issues.apache.org/jira/browse/SOLR-69
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>         Attachments: lucene-queries-2.0.0.jar, SOLR-69.patch, SOLR-69.patch, SOLR-69.patch
>
>
> Here's a patch that implements simple support of Lucene's MoreLikeThis class.
> The MoreLikeThisHelper code is heavily based on (hmm..."lifted from" might be more appropriate ;-) Erik Hatcher's example mentioned in http://www.mail-archive.com/solr-user@lucene.apache.org/msg00878.html
> To use it, add at least the following parameters to a standard or dismax query:
>   mlt=true
>   mlt.fl=list,of,fields,which,define,similarity
> See the MoreLikeThisHelper source code for more parameters.
> Here are two URLs that work with the example config, after loading all documents found in exampledocs in the index (just to show that it seems to work - of course you need a larger corpus to make it interesting):
> http://localhost:8983/solr/select/?stylesheet=&q=apache&qt=standard&mlt=true&mlt.fl=manu,cat&mlt.mindf=1&mlt.mindf=1&fl=id,score
> http://localhost:8983/solr/select/?stylesheet=&q=apache&qt=dismax&mlt=true&mlt.fl=manu,cat&mlt.mindf=1&mlt.mindf=1&fl=id,score
> Results are added to the output like this:
> <response>
>   ...
>   <lst name="moreLikeThis">
>     <result name="UTF8TEST" numFound="1" start="0" maxScore="1.5293242">
>       <doc>
>         <float name="score">1.5293242</float>
>         <str name="id">SOLR1000</str>
>       </doc>
>     </result>
>     <result name="SOLR1000" numFound="1" start="0" maxScore="1.5293242">
>       <doc>
>         <float name="score">1.5293242</float>
>         <str name="id">UTF8TEST</str>
>       </doc>
>     </result>
>   </lst>
> I haven't tested this extensively yet, will do in the next few days. But comments are welcome of course.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.