2012-02-27 87 views
1

我在Solr中的查询是q={!type=dismax qf='title content' bf=product(f1,f2)^10}data更改Solr DisMaxQParser行为

我发现DisMaxQParser做的是计算max{score_title, score_content} + score_bf。现在,我想将其行为更改为max{score_title, score_content} * score_bf

我该怎么做?

回答

0

您可以使用为Dismax查询提供附加功能的ExtendedDismaxQParserbf(boost函数)方法将函数结果作为评分的上瘾值。要将函数结果作为乘法值应用于分数,可以使用boost方法。您的查询将会是这样的:

q={!type=edismax qf='title content' boost=product(f1,f2)^10}data