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

后端 未结 3 871
心在旅途
心在旅途 2021-01-18 23:18

Here is my case;

I have a field at my schema named elmo_field. I want that elmo_field should have payloaded values. i.e.

do         


        
相关标签:
3条回答
  • 2021-01-18 23:41

    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.

    0 讨论(0)
  • 2021-01-18 23:56

    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/

    0 讨论(0)
  • 2021-01-19 00:04

    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/

    0 讨论(0)
提交回复
热议问题