solrlucidworks

Boosting a subset of documents pre indexing lucidworks / solr


I am making a search engine for a set of ~20,000 documents. These are mostly larger documents covering a series of topics however approximately 3000 of these are more specific. I would like to give all of the specific documents a pre-query boost in order to increase their relevancy score compared to the rest of the larger documents.

Is this a legitimate approach? If so, how would this be done in solr or lucidworks fusion?


Solution

  • that sounds pretty basic, just add a field "specificBoost" with a value of 2x the value of the other docs for specific docs (for example), and when querying, boost them at query time like this (if using edismax for instance):

    qf=xxx^&bf=fieldValue(specificBoost)