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 Tim Hearn <ti...@gmail.com> on 2014/11/07 17:15:59 UTC

Minimum Term Matching in More Like This Queries

Hi!

I'm fairly new to Solr.  Is there a feature which enforces minimum term
matching for MLT Queries?  More precisely, that is, a document will match
the MLT query if and only if at least x terms in the query are found in the
document, with x defined by the user.  I could not find such a feature in
the documentation, and switching to the edismax query parser and using the
'mm' parameter does not work for me.

Thanks!

Re: Minimum Term Matching in More Like This Queries

Posted by Anurag Sharma <an...@gmail.com>.
There is no direct way of retrieving doc based on minimum term match in
Solr. mlm params 'mlt.mintf' and 'mlt.match.offset' can be explored if they
meets the criteria. Refer below links for more details:
http://wiki.apache.org/solr/MoreLikeThisHandler
https://wiki.apache.org/solr/MoreLikeThis

In case you are using lucene library directly,setPercentTermsToMatch()
function can be used from MoreLikeThisQuery class.
Refer code:
https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThisQuery.java

On Fri, Nov 7, 2014 at 9:45 PM, Tim Hearn <ti...@gmail.com> wrote:

> Hi!
>
> I'm fairly new to Solr.  Is there a feature which enforces minimum term
> matching for MLT Queries?  More precisely, that is, a document will match
> the MLT query if and only if at least x terms in the query are found in the
> document, with x defined by the user.  I could not find such a feature in
> the documentation, and switching to the edismax query parser and using the
> 'mm' parameter does not work for me.
>
> Thanks!
>