AnsweredAssumed Answered

Configuring SOLR for MoreLikeThis functionality

Question asked by cszamudio on May 8, 2014
Latest reply on Aug 8, 2016 by afaust
Hi,

I've been trying to generate "More Like This" results from searches using SOLR and have not been successful in getting any results.
I assume I need to reference the TEXT field similar to the Lucene search expression.

I'm testing this using a URL like the following, using the default mlt parameters:

https://localhost:8493/solr/alfresco/afts?q=patent&mlt=true&mlt.count=10&mlt.fl=TEXT&rows=10

My repository is full of related patents, so I know there should be related entries.

I get the appropriate hits back from the search in the JSON response, but nothing in the moreLikeThis portion of the JSON response, e.g.,

"LEAF-4934":{"numFound":0,"start":0,"docs":[]} for each hit.

I can't find any reference to setting up a MoreLikeThisHandler for SOLR in Alfresco, but the SOLR documentation seems to indicate this needs to be set up. I've noticed that the Alfresco solr configuration of the mlt component specified in the SearchHandler so perhaps setting up a new Handler is not necessary.


<requestHandler name="/afts" class="solr.SearchHandler" >
    <lst name="defaults">
     <str name="defType">afts</str>
    </lst>
    <arr name="components">
      <str>setLocale</str>
      <str>query</str>
      <str>facet</str>
      <str>mlt</str>
      <str>highlight</str>
      <str>stats</str>
      <str>debug</str>
      <str>clearLocale</str>
    </arr>
  </requestHandler>


Has anyone had success generating MoreLikeThis results from a search?

Thanks,
Carlos S. Zamudio

Outcomes