lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seb835 <>
Subject Boosting score based on a 0 to 5 star rating
Date Wed, 02 Feb 2011 15:17:20 GMT

Hi All,

I have a set of data where a user can rate each search result (a book in my
case) using 0 to 5 stars (5 stars being a highly recommended book).

I therefore want to boost the relevancy score of results that have been
given a star rating. Now, I can do this quite easily as follows with this

"q=CookBook rating_value:1^0.1 rating_value:2^0.2" etc, etc...

The trouble with this query is as follows. If a book has a star rating of
anything over 0 (i.e. it actually has a rating), then it gets returned in
the search results - even if the word "CookBook" doesnt match within the
book title.

Is there any way to omit a result if there is no keyword match, even if it
has a star rating?

Many thanks in advance,
View this message in context:
Sent from the Solr - Dev mailing list archive at

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

View raw message