Also, consider using TermsQueryParser for your very large OR clauses.
That avoids the "too many boolean clauses" error and is more efficient
than a large OR clause. It'll also reduce the size of your query
somewhat since using it substitutes a space or perhaps comma for " OR
".

Best,
Erick

On Thu, Jan 12, 2017 at 9:18 AM, Noriyuki TAKEI <nta...@sios.com> wrote:
> Hi,all.I got it.Thanks a lot!!
>
> 2017年1月13日(金) 1:56 Shawn Heisey-2 [via Lucene] <
> ml-node+s472066n4313737...@n3.nabble.com>:
>
>>
>>
>>
>>
>> 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
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------
>>
>>
>>
>>
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>>
>>
>> http://lucene.472066.n3.nabble.com/Max-length-of-solr-query-tp4313734p4313737.html
>>
>>
>>
>>
>>
>> To start a new topic under Solr - User, email
>> ml-node+s472066n472068...@n3.nabble.com
>>
>>
>> To unsubscribe from Solr - User, click here
>> <http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=472068&code=bnRha2VpQHNpb3MuY29tfDQ3MjA2OHwxNDQxNjgyNDAz>
>> .
>>
>>
>> NAML
>> <http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Max-length-of-solr-query-tp4313734p4313740.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to