On Tue, Jul 19, 2011 at 11:41 PM, Jonathan Rochkind <rochk...@jhu.edu> wrote: > Is it generally recognized that this terminology is confusing, or is it just > me? > > I do understand what they do (at least well enough to use them), but I find > it confusing that it's called "defType" as a main param, but "type" in a > LocalParam
When used as the main param, it is still just the default (i.e. it may be overridden). For example defType=lucene&q={!func}1 > (and then there's 'qt', often confused with defType/type by newbies, since > they guess it stands for 'query type', but which should probably actually > have been called 'requestHandler'/'rh' instead, since that's what it actually > chooses, no? It gets very confusing). Yeah, "qt" is very historical... before the QParserPlugin framework, and before request handlers were used for many other things (including updates). -Yonik http://www.lucidimagination.com > If it's generally recognized it's confusing and perhaps a somewhat > inconsistent mental model being implied, I wonder if there'd be any interest > in renaming these to be more clear, leaving the old ones as aliases/synonyms > for backwards compatibility (perhaps with a long deprecation period, or > perhaps existing forever). I know it was very confusing to me to keep track > of these parameters and what they did for quite a while, and still trips me > up from time to time. > > Jonathan > ________________________________________ > From: ysee...@gmail.com [ysee...@gmail.com] on behalf of Yonik Seeley > [yo...@lucidimagination.com] > Sent: Tuesday, July 19, 2011 9:40 PM > To: solr-user@lucene.apache.org > Subject: Re: defType argument weirdness > > On Tue, Jul 19, 2011 at 1:25 PM, Naomi Dushay <ndus...@stanford.edu> wrote: >> Regardless, I thought that defType=dismax&q=*:* is supposed to be >> equivalent to q={!defType=dismax}*:* and also equivalent to q={!dismax}*:* > > Not quite - there is a very subtle distinction. > > {!dismax} is short for {!type=dismax}, the type of the actual query, > and this may not be overridden. > > The defType local param is only the default type for sub-queries (as > opposed to the current query). > It's useful in conjunction with the "query" or nested query qparser: > http://lucene.apache.org/solr/api/org/apache/solr/search/NestedQParserPlugin.html > > -Yonik > http://www.lucidimagination.com >