Take the 2-minute tour ×

I have managed to build an index in Solr which I can search on keyword, produce facets, query facets etc. This is all working great. I have implemented my search using a dismax query so it searches predetermined fields.

However, my results are coming back sorted by score which appears to be calculated by keyword relevancy only. I would like to adjust the score where fields have pre-determined values. I think I can do this with boost query and boost functions but the documentation here:


Is not particularly helpful. I tried adding adding a bq argument to my search:


(yes, this is an index of films!) but I find when I start adding more and more:


I find the negative results - e.g. films that are DVD but are not BLU-RAY get negatively affected in their score. In the end it all seems to even out and my score is as it was before i started boosting.

I must be doing this wrong and I wonder whether "boost function" comes in somewhere. Any ideas on how to correctly use boost?

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

Apparently this is normal for films that are DVD but are not BLU-RAY get negatively affected in their score. This is because the more constraints you add the more the queryNorm value is reduced - and all scores are multiplied by this value.

share|improve this answer
add comment

This is a little late and it looks like you probably already have what you are looking for, but...

If you're curious about boost functions (which, judging by your desired results, I think you should be) you should check out the bf argument instead of the bq argument.

Try setting the bf argument to

media:DVD^2 media:BLU-RAY^1.5

and I think that could achieve what you want.

share|improve this answer
add comment

It sounds like you need to apply the boost at index time instead of query time. So when you are preparing documents to be added to the index, give those that are DVD a boost of 2, and those that are Blu-Ray a boost of 1.5.

share|improve this answer
add comment

Your Answer


