lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Aylward" <>
Subject Help Overriding behavior in BooleanQuery scorer
Date Tue, 07 Dec 2010 06:09:39 GMT
I would like to customize the scoring of the BooleanQuery. The scoring
for Boolean queries sums together each clause. Rather than summing
together each clause, I would like to take the max score of any of the


Ideally, I would like to inherit from BooleanScorer and BooleanScorer2
and make a couple of very minor changes to it. Unfortunately, both
classes are package protected and declared as final. This prevents me
from being able to modify them at all. It seems the only way I can
change this is to basically create a copy of a bunch of classes
(BooleanQuery, BooleanWeight, BooleanScorer, BooleanScorer2,
DisjunctionSumScorer, ConjunctionScorer, etc).


Does anyone know why many of those classes are package protected and
final? Any suggestions for how to customize this part of the scoring
algorithm without having to copy all of these classes?



Ryan Aylward

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