You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ahmet Arslan <io...@yahoo.com> on 2014/02/03 01:49:05 UTC

Re: MoreLikeThis

Hi,

What are your mlt.qf and mlt.fl parameters? And their types? 

Try creating an author field using lowercase type and use this field in mlt.qf and mlt.fl parameters.

 <!-- lowercases the entire field value, keeping it as a single token.  -->
    <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
      <analyzer>
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory" />
        <filter class="solr.TrimFilterFactory" />

      </analyzer>
    </fieldType>



On Friday, January 31, 2014 1:08 PM, rubenboada <ru...@csuc.cat> wrote:
Hi everybody,

I'm working on DSpace 3.2 and I want to change 'Related Documents'
functionality, which is based on Solr MoreLikeThis. Now when I open an item,
below his metadata appears 'Related Documents' where would have to show
other items of actual item's author, but appears items of another authors. I
have observed that if name or surname matchs with actual author's name or
surname, DSpace shows wrong items. For example, if item's author called
Jorge Perez Diaz and DSpace have another author called Marta Fernandez
Perez, first surname of Jorge matchs with second surname of Marta, and
DSpace shows Marta Fernandez Perez item in Related Documents of Jorge Perez
Diaz item. 

I readed http://wiki.apache.org/solr/MoreLikeThis and I tried to modify
values of mindf and mintf but I didn't resolve succesfully this problem.

Anyone knows the solution?

Thanks in advance



--
View this message in context: http://lucene.472066.n3.nabble.com/MoreLikeThis-tp4114605.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: MoreLikeThis

Posted by rubenboada <ru...@csuc.cat>.
Hi iorixxx,

Sorry for the delay in replying.

The code is the below:

/public void performSearch(DSpaceObject dso) throws SearchServiceException {

        if(queryResults != null)
        {
            return;
        }

        this.queryArgs = prepareDefaultFilters(getView());
        this.queryArgs.setRows(1);
        this.queryArgs.add("fl","dc.contributor.author,handle");
        this.queryArgs.add("mlt","true");
        this.queryArgs.add("mlt.fl","dc.contributor.author,handle");
        this.queryArgs.add("mlt.mindf","1");
        this.queryArgs.add("mlt.mintf","1");
        this.queryArgs.setQuery("handle:" + dso.getHandle());
        this.queryArgs.setRows(1);

        queryResults = getSearchService().search(queryArgs);

    }
/

I use dc.contributor.author for similarity (mlt.fl). I don't know which
parameter is mlt.qf, the code by default is the above, and I only changed
the part of dc.contributor.author.

Thanks

 



--
View this message in context: http://lucene.472066.n3.nabble.com/MoreLikeThis-tp4114605p4116022.html
Sent from the Solr - User mailing list archive at Nabble.com.