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 Anuj Bhargava <an...@gmail.com> on 2021/02/18 10:38:42 UTC
Solr 8.0 query length limit
Solr 8.0 query length limit
We are having an issue where queries are too big, we get no result. And if
we remove a few keywords we get the result.
Error we get - error 414 (Request-URI Too Long)
Have made the following changes in jetty.xml, still the same error
*<Set name="outputBufferSize"><Property
name="solr.jetty.output.buffer.size" default="32768" /></Set>*
* <Set name="outputAggregationSize"><Property
name="solr.jetty.output.aggregation.size" default="32768" /></Set>*
* <Set name="requestHeaderSize"><Property
name="solr.jetty.request.header.size" default="65536" /></Set>*
* <Set name="responseHeaderSize"><Property
name="solr.jetty.response.header.size" default="32768" /></Set>*
* <Set name="sendServerVersion"><Property
name="solr.jetty.send.server.version" default="false" /></Set>*
* <Set name="sendDateHeader"><Property
name="solr.jetty.send.date.header" default="false" /></Set>*
* <Set name="headerCacheSize"><Property
name="solr.jetty.header.cache.size" default="1024" /></Set>*
* <Set name="delayDispatchUntilContent"><Property
name="solr.jetty.delayDispatchUntilContent" default="false"/></Set>*
Re: Solr 8.0 query length limit
Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Also, investigate if you have repeating conditions and push those into
defaults in custom request handler endpoints (in solrconfig.xml).
Also, Solr supports parameter substitutions, if you have repeated
subconditions.
Regards,
Alex
On Thu., Feb. 18, 2021, 7:08 a.m. Thomas Corthals, <th...@klascement.net>
wrote:
> You can send big queries as a POST request instead of a GET request.
>
> Op do 18 feb. 2021 om 11:38 schreef Anuj Bhargava <an...@gmail.com>:
>
> > Solr 8.0 query length limit
> >
> > We are having an issue where queries are too big, we get no result. And
> if
> > we remove a few keywords we get the result.
> >
> > Error we get - error 414 (Request-URI Too Long)
> >
> >
> > Have made the following changes in jetty.xml, still the same error
> >
> > *<Set name="outputBufferSize"><Property
> > name="solr.jetty.output.buffer.size" default="32768" /></Set>*
> > * <Set name="outputAggregationSize"><Property
> > name="solr.jetty.output.aggregation.size" default="32768" /></Set>*
> > * <Set name="requestHeaderSize"><Property
> > name="solr.jetty.request.header.size" default="65536" /></Set>*
> > * <Set name="responseHeaderSize"><Property
> > name="solr.jetty.response.header.size" default="32768" /></Set>*
> > * <Set name="sendServerVersion"><Property
> > name="solr.jetty.send.server.version" default="false" /></Set>*
> > * <Set name="sendDateHeader"><Property
> > name="solr.jetty.send.date.header" default="false" /></Set>*
> > * <Set name="headerCacheSize"><Property
> > name="solr.jetty.header.cache.size" default="1024" /></Set>*
> > * <Set name="delayDispatchUntilContent"><Property
> > name="solr.jetty.delayDispatchUntilContent" default="false"/></Set>*
> >
>
Re: Solr 8.0 query length limit
Posted by Thomas Corthals <th...@klascement.net>.
You can send big queries as a POST request instead of a GET request.
Op do 18 feb. 2021 om 11:38 schreef Anuj Bhargava <an...@gmail.com>:
> Solr 8.0 query length limit
>
> We are having an issue where queries are too big, we get no result. And if
> we remove a few keywords we get the result.
>
> Error we get - error 414 (Request-URI Too Long)
>
>
> Have made the following changes in jetty.xml, still the same error
>
> *<Set name="outputBufferSize"><Property
> name="solr.jetty.output.buffer.size" default="32768" /></Set>*
> * <Set name="outputAggregationSize"><Property
> name="solr.jetty.output.aggregation.size" default="32768" /></Set>*
> * <Set name="requestHeaderSize"><Property
> name="solr.jetty.request.header.size" default="65536" /></Set>*
> * <Set name="responseHeaderSize"><Property
> name="solr.jetty.response.header.size" default="32768" /></Set>*
> * <Set name="sendServerVersion"><Property
> name="solr.jetty.send.server.version" default="false" /></Set>*
> * <Set name="sendDateHeader"><Property
> name="solr.jetty.send.date.header" default="false" /></Set>*
> * <Set name="headerCacheSize"><Property
> name="solr.jetty.header.cache.size" default="1024" /></Set>*
> * <Set name="delayDispatchUntilContent"><Property
> name="solr.jetty.delayDispatchUntilContent" default="false"/></Set>*
>
Re: Solr 8.0 query length limit
Posted by Anuj Bhargava <an...@gmail.com>.
Thanks Alex and Shawn.
Regards,
Anuj
On Thu, 18 Feb 2021 at 18:57, Shawn Heisey <ap...@elyograg.org> wrote:
> On 2/18/2021 3:38 AM, Anuj Bhargava wrote:
> > Solr 8.0 query length limit
> >
> > We are having an issue where queries are too big, we get no result. And
> if
> > we remove a few keywords we get the result.
>
> The best option is to convert the request to POST, as Thomas suggested.
> With that, the query parameters could be up to 2 megabytes in size
> with no config changes.
>
> The limit for this is enforced by Jetty -- the servlet container that
> Solr ships with. If you cannot switch your requests to POST, then you
> can find the following line in server/etc/jetty.xml, adjust it, and
> restart Solr:
>
> <Set name="requestHeaderSize"><Property
> name="solr.jetty.request.header.size" default="8192" /></Set>
>
> A header limit of 8KB is found in nearly all web servers and related
> software, like load balancers.
>
> Thanks,
> Shawn
>
Re: Solr 8.0 query length limit
Posted by Shawn Heisey <ap...@elyograg.org>.
On 2/18/2021 3:38 AM, Anuj Bhargava wrote:
> Solr 8.0 query length limit
>
> We are having an issue where queries are too big, we get no result. And if
> we remove a few keywords we get the result.
The best option is to convert the request to POST, as Thomas suggested.
With that, the query parameters could be up to 2 megabytes in size
with no config changes.
The limit for this is enforced by Jetty -- the servlet container that
Solr ships with. If you cannot switch your requests to POST, then you
can find the following line in server/etc/jetty.xml, adjust it, and
restart Solr:
<Set name="requestHeaderSize"><Property
name="solr.jetty.request.header.size" default="8192" /></Set>
A header limit of 8KB is found in nearly all web servers and related
software, like load balancers.
Thanks,
Shawn