lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilson Wu <songzi0...@gmail.com>
Subject Is it a lucene bug?
Date Thu, 26 Nov 2009 12:01:15 GMT
Hi,
     Recently, there is a requirement to sort the hits by both the
scores of documents and the updateTime which is a field of document to
mark the document's update time.  We want the new document in the
front and also want high score document in the front,in other words,
we want to mix the score and updateTime, but not first sort by
one,second by the other. So, I design a time based function f(t) to
calculte each document boost to write into the index store.
      The result is that I can caculate a value for each document
based its update time, and the value can influence the document score
through adjusting the fieldNorm value. But when I lookup the boost
value through the method document.getBoost() from every document in
the index store, I found the boost value = 1.0. Which means I can set
a document's boost value and the boost value can adjust the final
score, but I can't read the boost value from the document I have
searched out.
    Is it a bug in lucene? Thanks. I use lucene version 2.4.1.
    PS: Is there any other way to meet my reqirement?  I think it is
not a good idea to adjust document's final score through writing a
document boost into the index store. Because if I want to open two
interfaces to the Client: one is sorting documents only by score which
is just the similarity score and has not been adjusted by boost value
f(t), the other is sorting by final score which has been adjuested by
boost value f(t). Thank a lot!

                                               wilson

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message