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 Victor Ruiz <bi...@gmail.com> on 2013/03/04 15:01:28 UTC
MoreLikeThis boosted by Date
Hi,
In my Solr config I have a request handler that boosts newer items, using
date field:
<requestHandler name="dateBoost" class="solr.SearchHandler">
<lst name="defaults">
<str name="omitHeader">true</str>
<int name="rows">10</int>
<str name="fl">itemid,score</str>
<str name="q">{!boost b=$bf v=$qq}</str>
<str name="bf">recip(ms(NOW,date),0.000000006,1,1)</str>
</lst>
</requestHandler>
And I use also the MoreLikeThis handler
<requestHandler name="/mlt" class="solr.MoreLikeThisHandler">
<lst name="defaults">
<str name="omitHeader">true</str>
<str name="mlt.match.include">false</str>
<int name="rows">50</int>
<str name="fl">itemid,score</str>
<str name="mlt.fl">title,text</str>
<str name="mlt.mintf">1</str>
<str name="mlt.mindf">1</str>
<str name="mlt.minwl">3</str>
<str name="mlt.maxwl">15</str>
<str name="mlt.boost">true</str>
<str name="mlt.qf">text title^5</str>
</lst>
</requestHandler>
My question is: would it be possible to add a date boost to the items
returned by MoreLikeThis? Or to chain the requests in some way, that is, to
call my dateBoost handler with the itemids returned by MoreLikeThis.
I can get the result I want by sending a second query when I get the results
of MoreLikeThis:
http://localhost:8983/solr/mlt?q=itemid:item0 => item1 item2 item3 item4
http://localhost:8983/solr/select?qq=itemid:(item1 item2 item3
item4)&qt=dateBoost
I've been working with Solr for almost 2 years, and I've not found yet the
way to do it, if it exists... but I still wonder if there's any way to get
the same output saving the 2nd query.
Thanks in advance,
Victor
--
View this message in context: http://lucene.472066.n3.nabble.com/MoreLikeThis-boosted-by-Date-tp4044513.html
Sent from the Solr - User mailing list archive at Nabble.com.