You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Husain, Yavar" <yh...@firstam.com> on 2012/03/02 10:52:01 UTC

Dismax weird behaior wrt defType

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.
</PRE>
<BR>
******************************************************************************************<BR>This message may contain confidential or proprietary information intended only for the use of the<BR>addressee(s) named above or may contain information that is legally privileged. If you are<BR>not the intended addressee, or the person responsible for delivering it to the intended addressee,<BR>you are hereby notified that reading, disseminating, distributing or copying this message is strictly<BR>prohibited. If you have received this message by mistake, please immediately notify us by<BR>replying to the message and delete the original message and any copies immediately thereafter.<BR>
<BR>
Thank you.~<BR>
******************************************************************************************<BR>
FAFLD<BR>
<PRE>

Re: Dismax weird behaior wrt defType

Posted by Ahmet Arslan <io...@yahoo.com>.
> 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]
> 

Your second query example uses lucene query parser (which is default). You can confirm this via adding &debugQuery=on. It searches on default search field (defined in schema.xml)

&deftype=dismax does not change query parser at all.

Your first query example uses dismax, searches on qf (query fields). Your search URL does not contain qf, so I assume it is defined in defaults section? Try adding field(s) that you want to search on.

solr/select/?q=abc&start=0&rows=10defType=dismax&qf=myField