qf_dismax and pf_dismax are irrelevant -- I shouldn't have included
that info. They are passed in the url and they work; they do not
affect this problem.
Your reminder of debugQuery was a good one - I use that a lot but
forgot in this case.
Regardless, 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.
On Jul 18, 2011, at 5:44 PM, Erick Erickson wrote:
What are qf_dismax and pf_dismax? They are meaningless to
Solr. Try adding &debugQuery=on to your URL and you'll
see the parsed query, which helps a lot here....
If you change these to the proper dismax values (qf and pf)
you'll get beter results. As it is, I think you'll see output like:
<str name="parsedquery">+() ()</str>
showing that your query isn't actually going against
any fields....
Best
Erick
On Mon, Jul 18, 2011 at 7:15 PM, Naomi Dushay <ndus...@stanford.edu>
wrote:
I found a weird behavior with the Solr defType argument, perhaps
with
respect to default queries?
defType=dismax&q=*:* no hits
q={!defType=dismax}*:* hits
defType=dismax hits
Here is the request handler, which I explicitly indicate:
<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_dismax">id^0.8 id_t^0.8 title_t^0.3
mods_t^0.2
text</str>
<str name="pf_dismax">id^0.9 id_t^0.9 title_t^0.5
mods_t^0.2
text</str>
<int name="ps">100</int>
<float name="tie">0.01</float>
</requestHandler>
Solr Specification Version: 1.4.0
Solr Implementation Version: 1.4.0 833479 - grantingersoll -
2009-11-06
12:33:40
Lucene Specification Version: 2.9.1
Lucene Implementation Version: 2.9.1 832363 - 2009-11-03 04:37:25
- Naomi