I am using Solr to handle my text search needs. Now MLT (more like this) is enabled on f1. f2 is my date field. I want MLT results on f1 but I want them only from a subset of my DB i.e. results from after a certain date (a range query on f2). How can I customize MLT such that I can add this range query on f2 (a non MLT field)?
I am new to Solr as well as Java. Any help however basic will be really appreciated. Thanks.
According to https://wiki.apache.org/solr/MoreLikeThisHandler, the MoreLikeThisHandler supports CommonQueryParameters. This means you should be able to add an
fq(filter query) parameter to your search, and filter on f2 being between something and something else. For example:This says, find all the results from MLT, then add this filtering query.