用子查询解决solr评分计算的问题
思路是用子查询得出分数,然后用solr的自有的函数进行计算
http://127.0.0.1:8983/solr/collection1/select?q=text:思源科技研发事业部toon基础平台李&wt=json&indent=true&fl=*,score
http://127.0.0.1:8983/solr/collection1/select?q=text:思源科技研发事业部toon基础平台李&wt=json&indent=true&sort=product(socialLevel, query({!dismax v='思源科技研发事业部toon基础平台李'})) desc&fl=*,score
http://127.0.0.1:8983/solr/collection1/select?q=text:思源科技研发事业部toon基础平台李&wt=json&indent=true&sort=product(sum(socialLevel,consumeLevel), query({!dismax v='思源科技研发事业部toon基础平台李'})) desc&fl=*,score,dd:product(sum(socialLevel,consumeLevel), query({!dismax v='思源科技研发事业部toon基础平台李'}))
http://172.28.4.84:11010/solr/feed_shard2_replica3/select?q=title:%E6%9D%8E%E8%92%99&wt=json&indent=true&sort=product(sum(socialLevel,consumeLevel,serviceLevel),%20query({!dismax%20qf=title%20v=%27%E6%9D%8E%E8%92%99%27}))%20desc&fl=feedId,score,dd:product(sum(socialLevel,consumeLevel,serviceLevel),%20query({!dismax%20qf=title%20v=%27%E6%9D%8E%E8%92%99%27}))
http://172.28.4.84:11010/solr/feed_shard2_replica3/select?q=title:%E6%9D%8E%E8%92%99&wt=json&indent=true&sort=product(sum(socialLevel,consumeLevel,serviceLevel),%20query({!dismax%20qf='title subtitle'%20v=%27%E6%9D%8E%E8%92%99%27}))%20desc&fl=feedId,score,dd:product(sum(socialLevel,consumeLevel,serviceLevel),%20query({!dismax%20qf='title subtitle'%20v=%27%E6%9D%8E%E8%92%99%27}))
相关推荐
spylyt 2020-09-11
upxiaofeng 2020-06-11
TyCoding 2020-05-03
upxiaofeng 2020-04-30
lionelf 2020-04-20
TyCoding 2020-04-08
TyCoding 2020-03-26
wenchanter 2020-03-26
roygbip 2020-02-16
wsxsxz 2020-02-03
lionelf 2020-02-03
lionelf 2020-02-03
TyCoding 2020-02-01
heniancheng 2020-01-31
lionelf 2020-01-30
TyCoding 2020-01-10