Re: MoreLikeThis (MLT) - AND operator between the fields
Yes, I will be submitting a patch for mlt.operator parameter. Thanks & Regards, Kranti K Parisa http://www.linkedin.com/in/krantiparisa On Fri, Aug 16, 2013 at 7:19 AM, Erick Erickson wrote: > I don't know enough about MLT to have an opinion one way or the other. But > it's > perfectly fine to open up a JIRA and attach your patch, > see: http://wiki.apache.org/solr/HowToContribute > > Best > Erick > > > On Thu, Aug 15, 2013 at 12:13 PM, Kranti Parisa > wrote: > >> I was looking at the code and found that it is hard coded to Occur.SHOULD >> in MoreLikeThisQuery. >> >> I customized the code to pass a new parameter *mlt.operator*=AND/OR >> based on that it computes the MLT documents. Default operator is set to OR. >> And I also want to have *mlt.sort* option, So I will be trying for that >> as well. >> >> Do you guys think, we should make this part of the MLT feature? >> Please share your ideas. I can submit this change. >> >> >> Thanks & Regards, >> Kranti K Parisa >> http://www.linkedin.com/in/krantiparisa >> >> >> >> On Thu, Aug 15, 2013 at 12:05 AM, Kranti Parisa >> wrote: >> >>> Hi, >>> >>> It seems that when we pass multiple field names with mlt.fl parameter, >>> it is ORing them to find the MLT documents. >>> >>> Is there a way to specify AND operator? Means if mlt.fl=language,year, >>> then we should return back the MLT documents which has language AND year >>> field values as same as the main query result document. >>> >>> >>> http://localhost:8180/solr/mltCore/mlt?q=id:1&wt=json&mlt=true&mlt.fl=language,year&fl=*,score&mlt.mindf=0&mlt.mintf=0&mlt.match.include=false >>> >>> The above query should return those documents whose field values >>> (language, year) are exactly matching with the document id:1. >>> >>> Is this possible thru any config or param? If not, I think it's worth >>> having as a feature because we don't know the values of those fields to >>> apply as FQ. >>> >>> >>> Thanks & Regards, >>> Kranti K Parisa >>> http://www.linkedin.com/in/krantiparisa >>> >>> >> >
Re: MoreLikeThis (MLT) - AND operator between the fields
I don't know enough about MLT to have an opinion one way or the other. But it's perfectly fine to open up a JIRA and attach your patch, see: http://wiki.apache.org/solr/HowToContribute Best Erick On Thu, Aug 15, 2013 at 12:13 PM, Kranti Parisa wrote: > I was looking at the code and found that it is hard coded to Occur.SHOULD > in MoreLikeThisQuery. > > I customized the code to pass a new parameter *mlt.operator*=AND/OR > based on that it computes the MLT documents. Default operator is set to OR. > And I also want to have *mlt.sort* option, So I will be trying for that > as well. > > Do you guys think, we should make this part of the MLT feature? > Please share your ideas. I can submit this change. > > > Thanks & Regards, > Kranti K Parisa > http://www.linkedin.com/in/krantiparisa > > > > On Thu, Aug 15, 2013 at 12:05 AM, Kranti Parisa > wrote: > >> Hi, >> >> It seems that when we pass multiple field names with mlt.fl parameter, it >> is ORing them to find the MLT documents. >> >> Is there a way to specify AND operator? Means if mlt.fl=language,year, >> then we should return back the MLT documents which has language AND year >> field values as same as the main query result document. >> >> >> http://localhost:8180/solr/mltCore/mlt?q=id:1&wt=json&mlt=true&mlt.fl=language,year&fl=*,score&mlt.mindf=0&mlt.mintf=0&mlt.match.include=false >> >> The above query should return those documents whose field values >> (language, year) are exactly matching with the document id:1. >> >> Is this possible thru any config or param? If not, I think it's worth >> having as a feature because we don't know the values of those fields to >> apply as FQ. >> >> >> Thanks & Regards, >> Kranti K Parisa >> http://www.linkedin.com/in/krantiparisa >> >> >
Re: MoreLikeThis (MLT) - AND operator between the fields
I was looking at the code and found that it is hard coded to Occur.SHOULD in MoreLikeThisQuery. I customized the code to pass a new parameter *mlt.operator*=AND/OR based on that it computes the MLT documents. Default operator is set to OR. And I also want to have *mlt.sort* option, So I will be trying for that as well. Do you guys think, we should make this part of the MLT feature? Please share your ideas. I can submit this change. Thanks & Regards, Kranti K Parisa http://www.linkedin.com/in/krantiparisa On Thu, Aug 15, 2013 at 12:05 AM, Kranti Parisa wrote: > Hi, > > It seems that when we pass multiple field names with mlt.fl parameter, it > is ORing them to find the MLT documents. > > Is there a way to specify AND operator? Means if mlt.fl=language,year, > then we should return back the MLT documents which has language AND year > field values as same as the main query result document. > > > http://localhost:8180/solr/mltCore/mlt?q=id:1&wt=json&mlt=true&mlt.fl=language,year&fl=*,score&mlt.mindf=0&mlt.mintf=0&mlt.match.include=false > > The above query should return those documents whose field values > (language, year) are exactly matching with the document id:1. > > Is this possible thru any config or param? If not, I think it's worth > having as a feature because we don't know the values of those fields to > apply as FQ. > > > Thanks & Regards, > Kranti K Parisa > http://www.linkedin.com/in/krantiparisa > >
MoreLikeThis (MLT) - AND operator between the fields
Hi, It seems that when we pass multiple field names with mlt.fl parameter, it is ORing them to find the MLT documents. Is there a way to specify AND operator? Means if mlt.fl=language,year, then we should return back the MLT documents which has language AND year field values as same as the main query result document. http://localhost:8180/solr/mltCore/mlt?q=id:1&wt=json&mlt=true&mlt.fl=language,year&fl=*,score&mlt.mindf=0&mlt.mintf=0&mlt.match.include=false The above query should return those documents whose field values (language, year) are exactly matching with the document id:1. Is this possible thru any config or param? If not, I think it's worth having as a feature because we don't know the values of those fields to apply as FQ. Thanks & Regards, Kranti K Parisa http://www.linkedin.com/in/krantiparisa