Dismax and Grouping query

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

Dismax and Grouping query

Ty Hahn
Hi,

I've tried to use grouping query on DisMaxRequestHandler without success.
When I sent grouping query in Solr Admin, I could see parens of query
escaped in 'querystring' line with debugQuery On.
Is this the cause of the failure?

e.g.
When I send query like +(lucene solr),
I can see following line in the result page.
<str name="querystring">+\(lucene solr\)</str>

When I tried this with StandardRequestHandler, parens of the query were not
escaped. And the query was successfully answered.
Digging into the source of Solr, I could find the following line at
DisMaxRequestHandler.java.
userQuery = U.partialEscape(U.stripUnbalancedQuotes(userQuery)).toString();
And partialEscape function seems to carry out the escaping.

So... Can I carry out grouping query on DisMaxRequestHandler?
If so, should I use special character for grouping in stead of parens?

I'm pretty new on Solr. Any reply will help.
Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Dismax and Grouping query

hossman

: I've tried to use grouping query on DisMaxRequestHandler without success.

: e.g.
: When I send query like +(lucene solr),
: I can see following line in the result page.
: <str name="querystring">+\(lucene solr\)</str>

the dismax handler does not consider parens to be special characters.  if
it did, it's not clear what the semantics would be of a query like...
        q=A +(B C)    qf=X Y Z
..when building the query structure ... what happens if X:B exists and Y:C
exists? is that considered a match?

Generally, the "mm" param is used to indicate how many of the query terms
(that don't have a + or - prefix) are required, or you can explicitly
require/prohibit a term using + or -, but there is no way to require that
one of N sub terms is required (prohibiting any of N sub terms is easy,
just prohibit them all individually)



-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: Dismax and Grouping query

Ty Hahn
Thanks, Hoss.
It seems that I should think other options.
Thanks again.


On 9/29/07, Chris Hostetter <[hidden email]> wrote:

>
>
> : I've tried to use grouping query on DisMaxRequestHandler without
> success.
>
> : e.g.
> : When I send query like +(lucene solr),
> : I can see following line in the result page.
> : <str name="querystring">+\(lucene solr\)</str>
>
> the dismax handler does not consider parens to be special characters.  if
> it did, it's not clear what the semantics would be of a query like...
>         q=A +(B C)    qf=X Y Z
> ..when building the query structure ... what happens if X:B exists and Y:C
> exists? is that considered a match?
>
> Generally, the "mm" param is used to indicate how many of the query terms
> (that don't have a + or - prefix) are required, or you can explicitly
> require/prohibit a term using + or -, but there is no way to require that
> one of N sub terms is required (prohibiting any of N sub terms is easy,
> just prohibit them all individually)
>
>
>
> -Hoss
>
>