How to properly improve results in a Solr Dismax query

I managed to create an index in Solr, which I can search by keyword, create faces, query faces, etc. This all works great. I did my search using smax query so that it looked for predefined fields.

However, my results are returned sorted by invoice, which, apparently, is calculated only by the relevance of the keywords. I would like to set up an account where the fields have predefined values. I think I can do this with additional queries and enhancement functions, but here is the documentation:

http://wiki.apache.org/solr/DisMaxRequestHandler#head-6862070cf279d9a09bdab971309135c7aea22fb3

Not particularly helpful. I tried adding the bq argument to my search:

&bq=media:DVD^2 

(yes, this is a movie index!), but I find it when I start adding more and more:

 &bq=media:DVD^2&bq=media:BLU-RAY^1.5 

I find negative results - for example. films that are DVDs but not BLU-RAY negatively affect their rating. In the end, it all seemed to have leveled off, and my score was what it was before I started to rise.

I must be doing it wrong, and I wonder if the enhancement function is coming somewhere. Any ideas on how to use boost correctly?

+4
source share
3 answers

Apparently, this is normal for films that are DVDs, but not BLU-RAYs that are negatively affected in their rating. This is because the more restrictions you add, the more the queryNorm value decreases - and all points are multiplied by this value.

+3
source

It's a little late, and it looks like you probably already have what you are looking for, but ...

If you are interested in boost functions (which, judging by your desired results, I think you should), you should check 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 this could achieve what you want.

+5
source

It looks like you need to apply boost at index time instead of query time. Therefore, when you are preparing documents to be added to the index, give those who have a DVD a plus of 2, and with the fact that Blu-Ray has increased by 1.5.

-1
source

All Articles