Thanks everyone, that was a very informative thread.

One more curiosity: why are different set of fields being used based on the
query string:-


http://localhost:8983/solr/filesearch/select?fq=id:1193&;
q=*:*&debugQuery=true


   - parsedquery: "+DisjunctionMaxQuery((user_email:*:* | user_name:*:* |
   tags:*:* | (name_shingle_zh-cn:, , name_shingle_zh-cn:, ,) | id:*:*)~0.01)
   DisjunctionMaxQuery(((name_shingle_zh-cn:", , , ,"~100)^100.0 |
   tags:*:*)~0.01)",



I find it perplexing as the default values for qf and pf are very different
from above so I am not sure where these fields are coming from (although
they are all valid fields)
e.g. following query uses the my expected set of pf and qf.

http://localhost:8983/solr/filesearch/select?fq=id:1193&;
q=hello&debugQuery=true



   - parsedquery: "+DisjunctionMaxQuery(((name_token:hello)^60.0 |
   user_email:hello | (name_combined:hello)^10.0 | (name_zh-cn:hello)^10.0 |
   name_shingle:hello | comments:hello | user_name:hello | description:hello |
   file_content_zh-cn:hello | file_content_de:hello | tags:hello |
   file_content_it:hell | file_content_fr:hello | file_content_es:hell |
   file_content_en:hello | id:hello)~0.01)
DisjunctionMaxQuery((description:hello
   | (name_shingle:hello)^100.0 | comments:hello | tags:hello)~0.01)",


On Sat, Jan 6, 2018 at 12:05 PM, Chris Hostetter <hossman_luc...@fucit.org>
wrote:

>
> : Yes, i am using dismax. But dismax allows *:* for q.alt ,which also seems
> : like inconsistency.
>
> dismax is a *parser* that affects how a single query string is parsed.
>
> when you use defType=dismax, that only changes how the "q" param is
> parsed -- not any other query string params, like "fq" or "facet.query"
> (or "q.alt")
>
> when you have a request like "defType=dismax&q=&q.alt=*:*" what you are
> saying, and what solr is doing, is...
>
> * YOU: hey solr, use dismax as the default parser for the q param
> * SEARCHHANDLER: ok, if the "q" param does not use local params to
> override the parser, i will use dismax
> * SEARCHHANDLER: hey dismax qparser, go parse the string ""
> * DISMAXQP: that string is empty, so instead we should use q.alt
> * SEARCHHANDLER: ok, i will parse the q.alt param and use that query in
> place of the empty q param
> * SEARCHHANDLER: hey lucene qparser, the string "*:*" does not use local
> params to override the parser, please parse it
> * LUCENEQP: the string "*:*" is a MatchAllDocsQuery
> * SEARCHHANDLER: cool, i'll use that as my main query
>
>
>
> -Hoss
> http://www.lucidworks.com/
>

Reply via email to