关于"defType“的奇怪行为。任何线索都将不胜感激。
查询1:大写为T的http://localhost:8085/solr/select/?q=abc&version=2.2&start=0&rows=10&indent=on&defType=dismax defType --不获取结果
查询2:带有小T的http://localhost:8085/solr/select/?q=abc&version=2.2&start=0&rows=10&indent=on&deftype=dismax defType --完美,返回结果
在上面的查询中,我删除了boosting部分,因此我使用dismax。另外,在放置助推器的时候,反之亦然,deftype返回大写T,而不返回小写T。
发布于 2012-03-02 19:25:52
只需说明问题所在:defType=dismax很好,而deftype=dismax不能像您预期的那样工作,因为deftype不是有效的Solr参数。
发布于 2012-03-02 18:52:18
Solr不知道deftype参数,所以当您使用该参数时,Solr实际上使用默认的查询解析器,该解析器搜索默认的搜索字段(请参见schema.xml),并且不支持开箱即用的boosts。
您应该打开debugQuery来查看如何使用dixmax解析您的查询,以及它与使用Solr default query parser生成的查询有何不同。
https://stackoverflow.com/questions/9531203
复制相似问题