Dear Lucene users and developers, sorry for getting back to this old subject, but we are in the position of re-evaluating our current implementation, which uses re-compiled version of Lucene 3 with boolean scorers multiplying sub-scores. I was hoping that "flexible ranking" in Lucene 4 will provide a mechanism for that, but after a brief look it seems that "adition" is still locked in corresponding implementations of boolean scorers. I also can not see how CustomScoreQuery, suggested below, might help, so here we go again.
To illustrate the problem with a simplified example, think of a boolean query, comprised of 3 sub-clauses (A and B and C): then if for document #1 the score for query A = 3, for B = 3, for C = 3, then result score 3 + 3 + 3 = 9; and for another document #2 where score for A = 8, for B = 1 and for C = 1, result score 8 + 1 + 1 = 10. The thing is that in my case doc #1 is much more important, because its sub-clauses are "represented" much more evenly than in the doc #2, where B and C are represented poorly and it bubbles up only because of over-blown (for whatever reason) score of A. What's needed is some mechanism to represent poorness of B and C stronger - e.g. simple multiplication instead of addition, so that the score for doc #1 = 3*3*3 = 27 and for doc #2 = 8*1*1 = 8, and doc #1 wins. 1) do I miss something in Lucene 3 or 4? 2) wouldn't it be much more flexible, if there was an easy-to-override method/parameter in e.g. Similarity or BooleanQuery, to be invoked by boolean scorers for calculating compound score of boolean sub-clauses? On Tue, Jul 26, 2011 at 1:00 PM, Ian Lea <ian....@gmail.com> wrote: > Have you tried CustomScoreQuery/CustomScoreProvider? Complicated but > powerful. > > > -- > Ian. > > > On Mon, Jul 25, 2011 at 9:29 AM, Pavel Goncharik > <pavel.goncha...@gmail.com> wrote: >> Hi, >> >> as far as I can see, boolean scorers always sum up scores of their >> sub-scorers. It works, but in case of my application it's required to >> multiply sub-scores. >> Is there a simple/efficient way to do this (apart from modifying >> lucene's source code)? >> It seems to me that standard tricks (e.g. CustomScoreQuery or custom >> Similarity) would not help me in this case. >> >> Thanks in advance for helping! >> >> - Pavel >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org