简体   繁体   中英

Solr Dismax weird behavior

A weird behavior with respect to "defType". Any clues will be appreciated.

Query 1: http://localhost:8085/solr/select/?q=abc&version=2.2&start=0&rows=10&indent=on&defType=dismax [defType with capital T -- does not fetch results]

Query 2: http://localhost:8085/solr/select/?q=abc&version=2.2&start=0&rows=10&indent=on&deftype=dismax [defType with small T -- perfect, results returned]

In the above queries I have removed the boosting part because of which I am using dismax. And also while placing boosting stuff it is the other way round, deftype returns with capital T and does not return with small T.

The deftype parameter is unknown to Solr, so when you use this parameter, Solr actually uses the default query parser, which searchs on the default search field (see schema.xml) and doesn't support boosts out of the box.

You should turn debugQuery on to see how your query is parsed with dixmax and how it differs from the query generated with Solr default query parser.

只是说明问题所在: defType=dismax很好,而deftype=dismax不能正常工作,因为deftype不是有效的Solr参数。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM