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 Dmitry Kan <dm...@gmail.com> on 2012/01/12 15:49:30 UTC

FacetComponent: suppress original query

Hello list,

I need to split the incoming original facet query into a list of
sub-queries. The logic is done and each sub-query gets added into outgoing
queue with rb.addRequest(), where rb is instance of ResponseBuilder.
In the logs I see that along with the sub-queries the original query gets
submitted too. Is there a way of suppressing the original query?

-- 
Regards,

Dmitry Kan

Re: FacetComponent: suppress original query

Posted by Dmitry Kan <dm...@gmail.com>.
Yes, that's what I have started to use already. Probably, this is the
easiest solution. Thanks.

On Tue, Jan 17, 2012 at 3:03 AM, Erick Erickson <er...@gmail.com>wrote:

> Why not just up the maxBooleanClauses parameter in solrconfig.xml?
>
> Best
> Erick
>
> On Sat, Jan 14, 2012 at 1:41 PM, Dmitry Kan <dm...@gmail.com> wrote:
> > OK, let me clarify it:
> >
> > if solrconfig has maxBooleanClauses set to 1000 for example, than queries
> > with clauses more than 1000 in number will be rejected with the mentioned
> > exception.
> > What I want to do is automatically split such queries into sub-queries
> with
> > at most 1000 clauses inside SOLR and send them to shards. I have already
> > done the splitting and sending code, but how to bypass the
> > maxBooleanClauses check?
> >
> > Dmitry
> >
> > On Fri, Jan 13, 2012 at 7:40 PM, Chris Hostetter
> > <ho...@fucit.org>wrote:
> >
> >>
> >> : I would like to "by-pass" the maxBooleanClauses limit in such a way,
> that
> >> : those queries that contain boolean clauses more than
> maxBooleanClauses in
> >> : the number, would be automatically split into sub-queries. That part
> is
> >> : done.
> >> :
> >> : Now, when such a query arrives, solr throws
> >> :
> >> : org.apache.lucene.queryParser.ParseException: Cannot parse
> >> : 'AccessionNumber:(TS-E_284668 OR TS-E_284904 OR 0000950123-11-086962
> OR
> >> : TS-AS_292840 OR TS-AS_295661 OR TS-AS_296320 OR TS-AS_296805 OR
> >> : TS-AS_296819 OR TS-AS_296820)': too many boolean clauses
> >>
> >> I don't understand your question/issue ... you say you've already worked
> >> arround the maxBooleanClauses (ie: "That part is done") but you didn't
> say
> >> how, and in your followup quesiton, it sounds like you are still hitting
> >> the limit of maxBooleanClauses.
> >>
> >> So.... what exactly have you changed/done that is "done" and what is the
> >> new problem?
> >>
> >>
> >> -Hoss
> >>
> >
> >
> >
> > --
> > Regards,
> >
> > Dmitry Kan
>



-- 
Regards,

Dmitry Kan

Re: FacetComponent: suppress original query

Posted by Erick Erickson <er...@gmail.com>.
Why not just up the maxBooleanClauses parameter in solrconfig.xml?

Best
Erick

On Sat, Jan 14, 2012 at 1:41 PM, Dmitry Kan <dm...@gmail.com> wrote:
> OK, let me clarify it:
>
> if solrconfig has maxBooleanClauses set to 1000 for example, than queries
> with clauses more than 1000 in number will be rejected with the mentioned
> exception.
> What I want to do is automatically split such queries into sub-queries with
> at most 1000 clauses inside SOLR and send them to shards. I have already
> done the splitting and sending code, but how to bypass the
> maxBooleanClauses check?
>
> Dmitry
>
> On Fri, Jan 13, 2012 at 7:40 PM, Chris Hostetter
> <ho...@fucit.org>wrote:
>
>>
>> : I would like to "by-pass" the maxBooleanClauses limit in such a way, that
>> : those queries that contain boolean clauses more than maxBooleanClauses in
>> : the number, would be automatically split into sub-queries. That part is
>> : done.
>> :
>> : Now, when such a query arrives, solr throws
>> :
>> : org.apache.lucene.queryParser.ParseException: Cannot parse
>> : 'AccessionNumber:(TS-E_284668 OR TS-E_284904 OR 0000950123-11-086962 OR
>> : TS-AS_292840 OR TS-AS_295661 OR TS-AS_296320 OR TS-AS_296805 OR
>> : TS-AS_296819 OR TS-AS_296820)': too many boolean clauses
>>
>> I don't understand your question/issue ... you say you've already worked
>> arround the maxBooleanClauses (ie: "That part is done") but you didn't say
>> how, and in your followup quesiton, it sounds like you are still hitting
>> the limit of maxBooleanClauses.
>>
>> So.... what exactly have you changed/done that is "done" and what is the
>> new problem?
>>
>>
>> -Hoss
>>
>
>
>
> --
> Regards,
>
> Dmitry Kan

Re: FacetComponent: suppress original query

Posted by Dmitry Kan <dm...@gmail.com>.
OK, let me clarify it:

if solrconfig has maxBooleanClauses set to 1000 for example, than queries
with clauses more than 1000 in number will be rejected with the mentioned
exception.
What I want to do is automatically split such queries into sub-queries with
at most 1000 clauses inside SOLR and send them to shards. I have already
done the splitting and sending code, but how to bypass the
maxBooleanClauses check?

Dmitry

On Fri, Jan 13, 2012 at 7:40 PM, Chris Hostetter
<ho...@fucit.org>wrote:

>
> : I would like to "by-pass" the maxBooleanClauses limit in such a way, that
> : those queries that contain boolean clauses more than maxBooleanClauses in
> : the number, would be automatically split into sub-queries. That part is
> : done.
> :
> : Now, when such a query arrives, solr throws
> :
> : org.apache.lucene.queryParser.ParseException: Cannot parse
> : 'AccessionNumber:(TS-E_284668 OR TS-E_284904 OR 0000950123-11-086962 OR
> : TS-AS_292840 OR TS-AS_295661 OR TS-AS_296320 OR TS-AS_296805 OR
> : TS-AS_296819 OR TS-AS_296820)': too many boolean clauses
>
> I don't understand your question/issue ... you say you've already worked
> arround the maxBooleanClauses (ie: "That part is done") but you didn't say
> how, and in your followup quesiton, it sounds like you are still hitting
> the limit of maxBooleanClauses.
>
> So.... what exactly have you changed/done that is "done" and what is the
> new problem?
>
>
> -Hoss
>



-- 
Regards,

Dmitry Kan

Re: FacetComponent: suppress original query

Posted by Chris Hostetter <ho...@fucit.org>.
: I would like to "by-pass" the maxBooleanClauses limit in such a way, that
: those queries that contain boolean clauses more than maxBooleanClauses in
: the number, would be automatically split into sub-queries. That part is
: done.
: 
: Now, when such a query arrives, solr throws
: 
: org.apache.lucene.queryParser.ParseException: Cannot parse
: 'AccessionNumber:(TS-E_284668 OR TS-E_284904 OR 0000950123-11-086962 OR
: TS-AS_292840 OR TS-AS_295661 OR TS-AS_296320 OR TS-AS_296805 OR
: TS-AS_296819 OR TS-AS_296820)': too many boolean clauses

I don't understand your question/issue ... you say you've already worked 
arround the maxBooleanClauses (ie: "That part is done") but you didn't say 
how, and in your followup quesiton, it sounds like you are still hitting 
the limit of maxBooleanClauses.

So.... what exactly have you changed/done that is "done" and what is the 
new problem?


-Hoss

Re: FacetComponent: suppress original query

Posted by Dmitry Kan <dm...@gmail.com>.
Hello,

The problem seem to have been solved (still some testing is required). But
I stumbled upon another issue.. which requires telling a bit about the use
case.

I would like to "by-pass" the maxBooleanClauses limit in such a way, that
those queries that contain boolean clauses more than maxBooleanClauses in
the number, would be automatically split into sub-queries. That part is
done.

Now, when such a query arrives, solr throws

org.apache.lucene.queryParser.ParseException: Cannot parse
'AccessionNumber:(TS-E_284668 OR TS-E_284904 OR 0000950123-11-086962 OR
TS-AS_292840 OR TS-AS_295661 OR TS-AS_296320 OR TS-AS_296805 OR
TS-AS_296819 OR TS-AS_296820)': too many boolean clauses

one way to avoid this is to set maxBooleanClauses to some large number and
maintain a real maxBooleanClauses value inside the code. But is there a
better way to handle this?

Thanks.

On Thu, Jan 12, 2012 at 4:49 PM, Dmitry Kan <dm...@gmail.com> wrote:

> Hello list,
>
> I need to split the incoming original facet query into a list of
> sub-queries. The logic is done and each sub-query gets added into outgoing
> queue with rb.addRequest(), where rb is instance of ResponseBuilder.
> In the logs I see that along with the sub-queries the original query gets
> submitted too. Is there a way of suppressing the original query?
>
> --
> Regards,
>
> Dmitry Kan
>



-- 
Regards,

Dmitry Kan