在 Solr 中,我们可以使用 max score 而不是 sum for or clauses 吗?
In Solr, can we take max score instead of sum for or clauses?
我正在处理具有 4 个 OR 条件和一个 AND 条件的 Solr 查询:
(
(
{!dismax qf=respondent_address_txt mm=3<70% v=$q2}^3.0
OR
{!dismax qf=respondent_addresses_txt mm=3<70% v=$q2}^1.0
OR
{!dismax qf=respondent_address_txt mm=3<70% v=$q3}^3.0
OR
{!dismax qf=respondent_addresses_txt mm=3<70% v=$q3}^1.0
)
AND
{!dismax qf=respondent_name_txt mm=2<70% v=$q1}^3.0
)
是否有可能 OR 条件的分数不加起来,而是应该取最大值,
假设 4 个单独的查询部分导致得分 1、2、3、4,而不是总得分 10 而应该是 4。
是的,(e)dismax 查询解析器允许使用 tie
参数精确地做到这一点。
默认值已经生成了 "disjunction max query",因此使用总和意味着此参数可能会在您的配置或请求中的某处被覆盖(设置为 1.0
而不是 0.0
).
The tie parameter lets you control how much the final score of the
query will be influenced by the scores of the lower scoring fields
compared to the highest scoring field.
A value of "0.0" - the default - makes the query a pure "disjunction
max query": that is, only the maximum scoring subquery contributes to
the final score.
value of "1.0" makes the query a pure "disjunction sum query" where
it doesn’t matter what the maximum scoring sub query is, because the
final score will be the sum of the subquery scores. Typically a low
value, such as 0.1, is useful.
我正在处理具有 4 个 OR 条件和一个 AND 条件的 Solr 查询:
(
(
{!dismax qf=respondent_address_txt mm=3<70% v=$q2}^3.0
OR
{!dismax qf=respondent_addresses_txt mm=3<70% v=$q2}^1.0
OR
{!dismax qf=respondent_address_txt mm=3<70% v=$q3}^3.0
OR
{!dismax qf=respondent_addresses_txt mm=3<70% v=$q3}^1.0
)
AND
{!dismax qf=respondent_name_txt mm=2<70% v=$q1}^3.0
)
是否有可能 OR 条件的分数不加起来,而是应该取最大值,
假设 4 个单独的查询部分导致得分 1、2、3、4,而不是总得分 10 而应该是 4。
是的,(e)dismax 查询解析器允许使用 tie
参数精确地做到这一点。
默认值已经生成了 "disjunction max query",因此使用总和意味着此参数可能会在您的配置或请求中的某处被覆盖(设置为 1.0
而不是 0.0
).
The tie parameter lets you control how much the final score of the query will be influenced by the scores of the lower scoring fields compared to the highest scoring field.
A value of "0.0" - the default - makes the query a pure "disjunction max query": that is, only the maximum scoring subquery contributes to the final score.
value of "1.0" makes the query a pure "disjunction sum query" where it doesn’t matter what the maximum scoring sub query is, because the final score will be the sum of the subquery scores. Typically a low value, such as 0.1, is useful.