lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Li <>
Subject about function query
Date Wed, 23 Jun 2010 03:13:50 GMT
I want to integrate document's timestamp into scoring of search. And I
find an example in the book "Solr 1.4 Enterprise Search Server" about
function query. I want to boost a document which is newer. so it may
be a function such as 1/(timestamp+1) . But the function query is
added to the final result, not multiplied. So I can't adjust the
parameter well.
search term is term1, topdocs are doc1 with score 2.0; doc2 with score 1.5.
search term is term2, topdocs are doc1 with score 20;  doc2 with score 15.
it is hard to adjust the relative score of these 2 docs with add a value.  i
if it is multiply, it's easy. if doc1 is very old, we assign a score
1,and doc2 is new, we assign a score 2
thus total score is 2.0*1 1.5*2 . So doc2 rank higher than doc1
but when use add,  2.0 + weight*1, 1.5 +weight*2, it's hard to get a
proper weight.
if we let weight is 1, it works well for term1
but with term2, it 20 +1*1.5 15+1*2  time has little influence on the
final result.

View raw message