Re: Wired behavior of maxClauseCount restriction since upgrading to solr 9.1

2022-12-06 Thread michael dürr
Hi Hoss, This is a really helpful explanation! Even though I already shifted to the usage of the {!terms} query for such large boolean clause queries, it feels a lot better to know how and why things behave differently compared to the 8x solr version. Thanks! Michael On Tue, Dec 6, 2022 at 7:32

Re: Wired behavior of maxClauseCount restriction since upgrading to solr 9.1

2022-12-06 Thread Chris Hostetter
: I'm happy to provide some details as I still do not really understand the : difference to the situation before. The main difference is coming from the changes introduced in LUCENE-8811 (Lucene 9.0) which sought to ensure that the "global" maxClauseCount would be honored no matter what kind o

Re: Wired behavior of maxClauseCount restriction since upgrading to solr 9.1

2022-12-05 Thread michael dürr
Hi Hoss, I'm happy to provide some details as I still do not really understand the difference to the situation before. In case something like categoryId:[1 TO 1] also gets converted to some boolean term, then it's clear to me. Otherwise I do not understand why half the boolean clauses (512 + 1) al

Re: Wired behavior of maxClauseCount restriction since upgrading to solr 9.1

2022-12-05 Thread Chris Hostetter
: today we updated solr to version 9.1 (lucene version 9.3) Which version did you upgrade from? : Since then we noticed plenty of TooManyNestedClauses in the logs. Our : setting for maxClauseCount is 1024 Exactly where/how are you setting that? There are 2 settings related to this... https:

Re: Wired behavior of maxClauseCount restriction since upgrading to solr 9.1

2022-12-02 Thread michael dürr
Hi Jan, thanks! That helped :-) On Fri, Dec 2, 2022 at 8:47 AM Jan Høydahl wrote: > A plain q=id:(a b c) is parsed into a boolean query with three SHOULD > clauses, i.e. OR. Try to add &debugQuery=true to a request and see how it > gets parsed. Then if the limit is 1024 you'll get errors above.

Re: Wired behavior of maxClauseCount restriction since upgrading to solr 9.1

2022-12-01 Thread Jan Høydahl
A plain q=id:(a b c) is parsed into a boolean query with three SHOULD clauses, i.e. OR. Try to add &debugQuery=true to a request and see how it gets parsed. Then if the limit is 1024 you'll get errors above. Jan > 2. des. 2022 kl. 07:43 skrev michael dürr : > > Thanks to all of you for your ad

Re: Wired behavior of maxClauseCount restriction since upgrading to solr 9.1

2022-12-01 Thread michael dürr
Thanks to all of you for your advice on using the terms query! I wasn't aware of this syntax until now. Anyways it would be good to know whether I hit a bug or not. Are my example queries probably rewritten to something that has more boolean clauses? If so, why doesn't that apply to the query for

Re: Wired behavior of maxClauseCount restriction since upgrading to solr 9.1

2022-12-01 Thread Kevin Risden
https://solr.apache.org/guide/solr/latest/query-guide/other-parsers.html#terms-query-parser The "!{terms ..." syntax is short for a query parser. Its a terms query parser and as Jan said its way more efficient than boolean clauses for a list of terms. Kevin Risden On Thu, Dec 1, 2022 at 1:04 PM

Re: Wired behavior of maxClauseCount restriction since upgrading to solr 9.1

2022-12-01 Thread Thomas Heigl
Hi Jan, We ran into the same issue. Terms queries sound like the ideal solution for our use case, but I couldn't find any documentation on the {!terms} syntax. Is there anything in the official docs? Best, Thomas On Thu, Dec 1, 2022 at 2:09 PM Jan Høydahl wrote: > Have you tried using Terms Q

Re: Wired behavior of maxClauseCount restriction since upgrading to solr 9.1

2022-12-01 Thread Jan Høydahl
Have you tried using Terms Query? It is much more efficient than many boolean should clauses ?q={!terms f=id}1 2 3 4...1025 Jan > 1. des. 2022 kl. 13:27 skrev michael dürr : > > Hi, > > today we updated solr to version 9.1 (lucene version 9.3) > Since then we noticed plenty of TooManyNestedCl

Wired behavior of maxClauseCount restriction since upgrading to solr 9.1

2022-12-01 Thread michael dürr
Hi, today we updated solr to version 9.1 (lucene version 9.3) Since then we noticed plenty of TooManyNestedClauses in the logs. Our setting for maxClauseCount is 1024 I played around a lot and could trace it down to this: * I built an index from scratch with two fields (id is unique key) and luce