Search code examples
solrmorelikethissolr5

Solr morelikethis returns no documents


I try to build a product recommender using the Text from the productdescription as input for recommendations.

But for some reasons I don't get any results. I setup the productdescription as textfield in the Schema.XML . I also marked it as a vector field.

My query looks like this select?q=id:189&mlt=true&mlt.fl=productdescription&mlt.mintf=1&mlt.mindf=0

From my understanding this query should somehow alsways bring me some similar items even if the score would be very low as df is set to 0.

But the only result I get is sometimes a duplicate of a product with the same description but an different ID (the dataset is not perfect).

So my question is: how can I always get the next nearest document even if there is no 1:1 match from the whole Text


Solution

  • I had a similar issue where no results were showing until I added mlt.mintf=1, which I see you have, but perhaps play around with those mintf mindf parameters to see if something yields results. I've actually been looking for more in depth examples for MoreLikeThis..