Adding Boost to Score According to Payload of Multivalued Field at Solr

北战南征 提交于 2019-12-01 17:56:21

I've implemented a custom similarity wrapper. For usual things I've used DefaultSimilarity. If a field is a payloaded field another similarity that is implemented by me is used. That similarity class just ignores payload value. I've also implemented a query parser that is a customized version of edismax. With that approach I could add payload value into the document score.

Have you looked at CustomScoreQuery?

There's an example with some explanation how to do this at http://dev.fernandobrito.com/2012/10/building-your-own-lucene-scorer/

jmcmahon

You could do a boost on a query as this question suggests: How to assign a weight to a term query in Lucene/Solr

Or you could try using payloads as described here: http://searchhub.org/2009/08/05/getting-started-with-payloads/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!