lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klaus Malorny <>
Subject Alternative scoring of BooleanQuery
Date Tue, 07 Jul 2009 16:41:52 GMT

Hi all,

sorry if this is FAQ or has been answered in the list earlier, but unfortunately 
I did not find a decent way to search in the archive (maybe a job for Lucene ;-) )

For some reason, I had to split my document into multiple fields. For the 
search, I create a query with two subqueries for the same term within each 
field, combining it via a BooleanQuery/Occur.SHOULD. If a term happens to appear 
in both fields, the score is added (and scaled, if disableCoord is false). In my 
context this is not really what I want. I would prefer to have a simple 
"maximum" function over the scores of the subqueries. Since I do not consider 
myself an expert in the internal working of Lucene, is there an easy way to 
achieve this or do I have to reimplement the whole BooleanQuery class?

Thanks for any advice.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message