lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Savvas-Andreas Moysidis <>
Subject Re: Is it a lucene bug?
Date Thu, 26 Nov 2009 13:24:48 GMT

I’m not exactly sure I understand they the type of sorting you are trying to

You have an updateTime field and you mention that "We want the new document
in the
front and also want high score document in the front".

My take on this is that you want to first sort by the updateTime and then by
score but you say this is not the case?

Instead of calculating a boost value with f(t) can you not calculate and
index the actual value you need for every document?

Then you can  first sort by this value and then by score?



2009/11/26 Wilson Wu <>

> 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:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message