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 "Choi, David" <dc...@amazon.com> on 2008/10/10 23:41:10 UTC

Solr has limit to number of returned results?

Hi everyone, I have a (hopefully) basic question..

Does solr have a max. limit on the number of returned results?
I get the following error: "HTTP Status 500 - maxClauseCount is set to 1024 org.apache.lucene.search.BooleanQuery$TooManyClauses" when I do a query that essentially amounts to asking for q=*

thanks
- David Choi


Re: Solr has limit to number of returned results?

Posted by Chris Hostetter <ho...@fucit.org>.
As mentioned TooManyClauses has nothing to do with the number of results 
returned, and everything to do with the way the number of terms in 
"rewritten" query.  these exceptions are a kind of safety net in the 
Lucene internals to prevent the entire application from crashing with an 
OOM exception on input that is "too vague"

Three is a solrconfig.xml option for adjusting what the limit of this 
safety net is.

: 1024 org.apache.lucene.search.BooleanQuery$TooManyClauses" when I do a 
: query that essentially amounts to asking for q=*

q=* isn't legal syntax ... can you be a little more specific about what 
type of query you are trying to execute?

As far as i can remember, starting with Solr 1.3, no input to any 
of the built in query parsers should be able to trigger a TooManyClauses 
(since WildcardQueries now rewrite to a Filter just like prefix and range 
queries)


-Hoss

RE: Solr has limit to number of returned results?

Posted by Chris Hostetter <ho...@fucit.org>.
: These blow up with "too many clauses": H*? and H*H and H*H*. And when they
: don't blow up (Solr 1.3) they do not return any results when they should.

Uh ... i'm not sure what you mean by "they do not return any results when 
they should" ... can you elaborate because wildcard queries should work 
just fine in Solr 1.3


-Hoss


RE: Solr has limit to number of returned results?

Posted by Lance Norskog <go...@gmail.com>.
To select all, do star-colon-star *:*
To select a negative clause do   *:* AND -clause
To select a wildcard, h* and h?* work fine.  
Star as the only character, or star or ? as the first character are not
allowed.

These blow up with "too many clauses": H*? and H*H and H*H*. And when they
don't blow up (Solr 1.3) they do not return any results when they should.

Lance

-----Original Message-----
From: Choi, David [mailto:dchoi@amazon.com] 
Sent: Friday, October 10, 2008 2:41 PM
To: solr-user@lucene.apache.org
Subject: Solr has limit to number of returned results?

Hi everyone, I have a (hopefully) basic question..

Does solr have a max. limit on the number of returned results?
I get the following error: "HTTP Status 500 - maxClauseCount is set to 1024
org.apache.lucene.search.BooleanQuery$TooManyClauses" when I do a query that
essentially amounts to asking for q=*

thanks
- David Choi



Re: Solr has limit to number of returned results?

Posted by Alok Dhir <ad...@symplicity.com>.
clauses in not the results -- its what you're sending in as the  
query.  apparently it's larger than 1024 clauses...

On Oct 10, 2008, at 5:41 PM, Choi, David wrote:

> Hi everyone, I have a (hopefully) basic question..
>
> Does solr have a max. limit on the number of returned results?
> I get the following error: "HTTP Status 500 - maxClauseCount is set  
> to 1024 org.apache.lucene.search.BooleanQuery$TooManyClauses" when I  
> do a query that essentially amounts to asking for q=*
>
> thanks
> - David Choi
>