I thought that defType=dismax&q=*:* is supposed to be equivalent to q={!defType=dismax}*:* and also equivalent to q={!dismax}*:*
defType=dismax&q=*:* DOESN'T WORK
<str name="rawquerystring">*:*</str>
<str name="querystring">*:*</str>
<str name="parsedquery">+() ()</str>
<str name="parsedquery_toString">+() ()</str>
leaving out the explicit query
defType=dismax WORKS
<null name="rawquerystring"/>
<null name="querystring"/>
<str name="parsedquery">+MatchAllDocsQuery(*:*)</str>
<str name="parsedquery_toString">+*:*</str>
q={!dismax}*:* DOESN'T WORK
<str name="rawquerystring">*:*</str>
<str name="querystring">*:*</str>
<str name="parsedquery">+() ()</str>
<str name="parsedquery_toString">+() ()</str>
leaving out the explicit query:
q={!dismax} WORKS
<str name="rawquerystring">{!dismax}</str>
<str name="querystring">{!dismax}</str>
<str name="parsedquery">+MatchAllDocsQuery(*:*)</str>
<str name="parsedquery_toString">+*:*</str>
q={!defType=dismax}*:* WORKS
<str name="rawquerystring">{!defType=dismax}*:*</str>
<str name="querystring">{!defType=dismax}*:*</str>
<str name="parsedquery">MatchAllDocsQuery(*:*)</str>
<str name="parsedquery_toString">*:*</str>
leaving out the explicit query:
q={!defType=dismax} DOESN'T WORK
org.apache.lucene.queryParser.ParseException: Cannot parse '': Encountered "<EOF>" at line 1, column 0.
<requestHandler name="search" class="solr.SearchHandler" default="true">
<lst name="defaults">
<str name="defType">lucene</str>
<!-- lucene params -->
<str name="df">has_model_s</str>
<str name="q.op">AND</str>
<!-- dismax params -->
<str name="mm"> 2<-1 5<-2 6<90% </str>
<str name="q.alt">*:*</str>
<str name="qf">text</str>
<str name="pf">text</str>
</requestHandler>
> This is cross posted to solr-user and to hydra-tech lists.
>
> I discovered a weird behavior with the Solr defType parameter. See
>
> http://www.lucidimagination.com/search/document/39c0e70e20853e93/deftype_argument_weirdness
>
> I encountered this as I was trolling through my Solr logs, working out some implementation issue in a Hydra application. It is possible this is addressed per the discussion re: Blacklight solr parameters arguments. In case that is not true:
>
> in hydra-head/app/controllers/catalog_controller,
>
> line 86:
>
> params = {:qt=>"search",:defType=>"dismax",:q=>"*:*",:rows=>"0",:facet=>"true", :facets=>{:fields=>Blacklight.config[:facet][:field_names]}}
>
> should probably be
>
> params = {:qt=>"search",:q=>"{!defType=dismax}*:*",:rows=>"0",:facet=>"true", :facets=>{:fields=>Blacklight.config[:facet][:field_names]}}
huh?! I replied on that e-mail thread answering but maybe I wasn't clear?
No. {!defType=anything} is ineffective. It doesn't control the query parser that way. Besides, *:* is not recognized by the dismax parser. But anyway, {!defType=dismax} doesn't select dismax, so you're falling back to the "lucene" query parser default and thus *:* works.
If you want to use dismax, yet make a request to match all docs, leave q empty or unspecified, and use q.alt=*:*.
Erik
Chris
> --
> You received this message because you are subscribed to the Google Groups "Blacklight Development" group.
> To post to this group, send email to blacklight-...@googlegroups.com.
> To unsubscribe from this group, send email to blacklight-develo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/blacklight-development?hl=en.
>