Boost Search Fields

James Mosquito asked on September 17, 2021 18:15

Hi,

We are building up a manual search query to use with the Smart Search Indexes in Kentico 12SP MVC.

A typical query looks like: "+(title:(headsets) _content:(headsets) documentcategories:(headsets) documentpagedescription:(headsets) documentpagekeywords:(headsets) documentpagetitle:(headsets) skuname:(headsets) skunumber:(headsets) indexbrand:(headsets) indexmanufacturer:(headsets) searchkeywords:(headsets))"

This is added as a SearchPattern to the SearchParameters.PrepareForPages() method and passed into the SearchHelper.Search() method.

If we try to add lucene keyword boosting values to any of the fields it doesn't seem to impact the search score or position of those results that contain a match in that field e.g. searchkeywords:(headsets)^4.0.

Are boost values supported? How else can we go about boosting results? Or worst case, do we need to manually handle this on the resultset?

Thanks James

Recent Answers


Juraj Ondrus answered on September 20, 2021 07:14

Have you tried using bigger boosting values? Sometimes you need to experiment and e.g. start with high values and then lower them to meet your needs. Have you seen this article already? It uses just sample values, but in some cases you may need to use ^10 or ^100 depending on where is the term present everywhere - maybe other fields have higher ranking even if you boost other field by ^4.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.