lucene – dismax solr请求处理程序MM,PS和Q.ALT

我正在测试dismax requesthandler,我试图自定义mm(最小匹配)参数(我已经查看了文档)
<str name="mm">
 2<-2 3<-70% 5<-50%  
 </str>
 <int name="ps">100</int>
 <str name="q.alt">*:*</str>

我有3个问题:

> mm,我理解它的作用,我想验证我的参数是否正常,

correct me if im wrong
2<-2 3<-70% 5<-50% stands for ? :

  • if 1 or 2 terms match 100% of them
  • if 3 to 4 match only 70% of them
  • if 5 or more match only 50%

> ps:这个参数是什么?这是强制性的吗?
> q.alt:同样我不明白那个的实用性.

你能为我提供disMax最佳配置的一些建议吗?

谢谢 !

解决方法

1:你的字符串会转换为
1-2 terms: match all terms
3 terms: total number of terms - 2 must match (i.e. 1 term must match :)
4-5 terms: 70% of the terms must match 
6+ terms: 50% of the terms must match

mm-string来实现你的要求

2<%70 4<%50

可以找到一个非常好的mm字符串资源here.

2:pf参数用于基于彼此非常接近的查询术语来提高文档相关性(而不是分散在整个文档中).

3:q.alt参数用作客户端未提供任何搜索条件的情况的后备查询.在我的解释中,如果您不进行任何客户端查询处理/转换,则可以使用它,但可能还有其他实际用途.

相关文章

vue阻止冒泡事件 阻止点击事件的执行 &lt;div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些