2

I've got a query in Sitecore the boosts on template type, but this is skewed by the IDF (inverse document frequency). Is it possible to set sitecore/Lucene to ignore the IDF?

Or if anyone has any other ideas on how to boost the results of certain template types

1

2 Answers 2

1

On Lucene, you will need to implement a customScorer as far as I can see. I would not go in that direction. If you move to Solr (recommended approach anyway) you can use function queries (in a boostFunction parameter) to boost with a precise value or use the ^= constant score facility in a boost query

in Solr it would look like:

https://<solrhost>/solr/<collectionname>/<handlername - query>?q=searh+for&bq=_template:<id>"^=10

you will just add a number of bq parameters for multiple template ids.

1
0

I don't know possible way disable idf. But you can try negative boosting by fields. Usual the most search pages use Title and Body for search by documents, so boost this fields on 0 or 0.25, try any value that less then 1 and find yours.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.