On 1/12/2017 9:36 AM, 武井宜行 wrote:
> My Application throws too large query to solr server with solrj
> client.(Http Method is Post)
>
> I have two questions.
>
> At first,I would like to know the limit of  clauses of Boolean Query.I Know
> the number is restricted to 1024 by default, and I can increase the limit
> by setting setMaxClauseCount,but what is the limit of increasing clauses?

The maximum possible value for maxBooleanClauses is Java's
Integer.MAX_VALUE -- about 2.1 billion.  Note that if you want to
increase this setting, you must do it in EVERY configuration.  The
setting is global, which means that the last core that loads is the one
that sets it for everything running in that JVM.  If the last core that
loads happens to be missing the config, it will be set back to 1024. 
Some of us have been trying to get this limit lifted, or at least
arranged so that it doesn't have to be changed on every core, but we've
been meeting with some resistance.

> Next,if there is no limit of increasing clauses,is there the limit of query
> length?My Application throws to large query like this with solrj client.

The default size limit on a POST request is 2MB, since about version
4.1.  Before that version, it was controlled by the container config,
not Solr.  This can be adjusted with the formdataUploadLimitInKB setting
in solrconfig.xml.  The default value for this is 2048, resulting in the
2MB I already mentioned.  This page contains the documentation for that
setting:

https://cwiki.apache.org/confluence/display/solr/RequestDispatcher+in+SolrConfig

Thanks,
Shawn

Reply via email to