Shawn - thank you!  That works great.  Stupid huge searches here I come!
-Joe


On 7/12/2018 4:46 PM, Shawn Heisey wrote:
On 7/12/2018 12:48 PM, Joe Obernberger wrote:
Hi - I'm using SolrCloud 7.3.1 and calling a search from Java using:

org.apache.solr.client.solrj.response.QueryResponse response =
CloudSolrClient.query(ModifiableSolrParams)

If the ModifiableSolrParams are long, I get an error:
<h1>Bad Message 414</h1><pre>reason: URI Too Long</pre>

I have the maximum number of terms set to 1024 (default), and I'm
using about 500 terms.  Is there a way around this?  The total query
length is 10,131 bytes.
Add a parameter to the query call.  Change this:

client.query(query)

to this:

client.query(query, METHOD.POST)

The import you'll need for that is
org.apache.solr.client.solrj.SolrRequest.METHOD.

What you're running into is the length limit on the HTTP request of 8192
characters.  This is the limit that virtually all webservers, including
the Jetty that Solr includes, have configured.  Changing the request
method to POST puts all those parameters into the request body.  Solr's
default limit on the size of the request body is 2 megabytes.

Thanks,
Shawn


---
This email has been checked for viruses by AVG.
https://www.avg.com



Reply via email to