Forum list » General discussion »
Using Lucene to boost latest articles
Pages:  1
(12 posts)

Using Lucene to boost latest articles

How can I boost the search result in a way that the latest articles are more relevant?

I found this thread https://www.progress.com/documentation/sitefinity-cms/for-developers-customize-the-lucene-search-scoring that could be relevant for the scoring function, but I am not sure how to use it with Webnodes.

I tried to use IndexQuery.CustomQuery (together with BodySearch), but when I did, I did not get any results.

(146 posts)

Re: Using Lucene to boost latest articles

Hi! 

Lucene has 3 different ways to boost scores when doing searches:

Document level boosting 

Document level field boosting

Query level boosting

 

Document level boosting is the easiest to archieve. This is done during indexing, so you can override the BuildSearchIndex method that has the Lucene doc as a parameter.

doc.SetBoost(1.5f);

 

Will that cover your scenario?