lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmoser <>
Subject Sorting by a percentage On a field
Date Fri, 15 Dec 2006 21:17:05 GMT

So, I am still new to Lucene, so please take this into consideration when
reading this. Up until now, a novice like myself has been able to finagle
Lucene into doing what we want. But now we have a problem that I have been
searching for the answer to. We allow users to profile our products with a
predetermined profile attribute id. We then want to take all the users
profiles on a product and take a particular number of times that this
particular profile attribute id has been chosen and come out with a
percentage for it. This is no problem. Where the problem comes into play is
that we want the user to be able to search for products that match that
particular profile attribute id. We want the higher percentages to come up
on top. To add to the complexity, we want to be able to allow for the user
to select multiple profile attribute ids and still have a combination of the
score to come up higher. Keep in mind, we would like to somehow keep these
in one field, because we are trying to use the same algorithm for something
that could potentially become very large. Any suggestions. The more detail,
the better. 


Product A
Attribute ID = 2    Percentage Chosen = 50%
Attribute ID = 5    Percentage Chosen = 30%
Attribute ID = 3    Percentage Chosen = 10%
Attribute ID = 13    Percentage Chosen = 30%

Product B
Attribute ID = 1    Percentage Chosen = 50%
Attribute ID = 2    Percentage Chosen = 20%
Attribute ID = 3    Percentage Chosen = 75%

So if a user selected the attributes that correspond to 2 and 3, then
Product B should show up before Product A because it has a combined score of
95% and A has a combined score of 40%.

Thanks for any help.

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

View raw message