lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diego Manilla Suárez <>
Subject Customizing scoring
Date Wed, 25 Apr 2007 12:23:43 GMT
We have an index with fields than can be multiple (i.e. a document has 
two fields called “pets” that contain “dog” and “cat”).

The problem comes when we calculate the score:

If a BooleanQuery is created as the addition of two TermQuery

TermQuery1 “pets:dog”

TermQuery2 “pets:cat”

BooleanQuery “(pets:dog pets:cat)” (boost = 3)

The score for this BooleanQuery is double (around 6) when the compared 
document has the field “pets” with these two values, but we want that 
the score is only 3, although there is more than one coincidence.

SUMMARY: we want that a BooleanQuery is scored like a whole Query.

Is there some way to do this?

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

View raw message