lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Victor Ruiz <bik1...@gmail.com>
Subject MoreLikeThis boosted by Date
Date Mon, 04 Mar 2013 14:01:28 GMT
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.

Mime
View raw message