dismax without q=

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

dismax without q=

Ryan McKinley
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
Reply | Threaded
Open this post in threaded view
|

Re: dismax without q=

Yonik Seeley-2
On 2/8/07, Ryan McKinley <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: dismax without q=

Mike Klaas
On 2/8/07, Yonik Seeley <[hidden email]> wrote:
> On 2/8/07, Ryan McKinley <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: dismax without q=

Ryan McKinley
i'm switching from standard to dismax and ran into this.

I'll post a little patch in a sec.

ryan
Reply | Threaded
Open this post in threaded view
|

Re: dismax without q=

Erik Hatcher
In reply to this post by Yonik Seeley-2

On Feb 8, 2007, at 11:55 PM, Yonik Seeley wrote:

> On 2/8/07, Ryan McKinley <[hidden email]> 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