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 Ryan McKinley <ry...@gmail.com> on 2007/02/09 05:44:19 UTC

dismax without q=

Assuming there is an fq=xxx in the query, could dismax support a
queryless query?

I know it may not seem too meaningfully, but it would be nice to use
the same handler / query for:

  ?fq=type:file&ft=published=true
  ?fq=type:file&ft=published=true&q=ryan
  ?fq=type:file&ft=published=true&q=

Even if the answer is "no", it should throw a better exception then:

java.lang.NullPointerException
	at org.apache.solr.util.SolrPluginUtils.stripUnbalancedQuotes(SolrPluginUtils.java:676)


thanks
ryan

Re: dismax without q=

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 8, 2007, at 11:55 PM, Yonik Seeley wrote:

> On 2/8/07, Ryan McKinley <ry...@gmail.com> wrote:
>> Assuming there is an fq=xxx in the query, could dismax support a
>> queryless query?
>
> It does seem reasonable for both dismax and the standard request
> hander, esp since we have faceting in the mix (asking for facet
> constraints without supplying a base query).

I haven't hopped on the dismax bandwagon just yet due to juggling so  
many other TODO items, but I'll chime in with what I do with the  
standard handler.  When only a facet constraint is being used, I  
default to q=[* TO *] (and soon to *:* to *really* get all documents).

	Erik




Re: dismax without q=

Posted by Ryan McKinley <ry...@gmail.com>.
i'm switching from standard to dismax and ran into this.

I'll post a little patch in a sec.

ryan

Re: dismax without q=

Posted by Mike Klaas <mi...@gmail.com>.
On 2/8/07, Yonik Seeley <yo...@apache.org> wrote:
> On 2/8/07, Ryan McKinley <ry...@gmail.com> wrote:
> > Assuming there is an fq=xxx in the query, could dismax support a
> > queryless query?
>
> It does seem reasonable for both dismax and the standard request
> hander, esp since we have faceting in the mix (asking for facet
> constraints without supplying a base query).
>
> I think Mike brought this up earlier as well.

Yeah, though it really only makes a big difference for dismax.  For
std, just use your fq's as the main query.  You can't do that for
dismax.  In our app, we exclusively use dismax, except when there
isn't a keyword query.  In these cases there is almost always both
filter queries and boost queries, so it that case we use std with the
boost queries as the main query.

It works, but it means maintaining two request handler configurations,
and causes a few subtle problems with highlighting (the boost queries
contribute terms to highlight, which is not the desired behaviour).

-Mike

Re: dismax without q=

Posted by Yonik Seeley <yo...@apache.org>.
On 2/8/07, Ryan McKinley <ry...@gmail.com> wrote:
> Assuming there is an fq=xxx in the query, could dismax support a
> queryless query?

It does seem reasonable for both dismax and the standard request
hander, esp since we have faceting in the mix (asking for facet
constraints without supplying a base query).

I think Mike brought this up earlier as well.

-Yonik