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 Ty Hahn <yo...@gmail.com> on 2007/09/28 12:36:02 UTC
Dismax and Grouping query
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.
Re: Dismax and Grouping query
Posted by Ty Hahn <yo...@gmail.com>.
Thanks, Hoss.
It seems that I should think other options.
Thanks again.
On 9/29/07, Chris Hostetter <ho...@fucit.org> 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
>
>
Re: Dismax and Grouping query
Posted by Chris Hostetter <ho...@fucit.org>.
: 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