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 "Kelly, Frank" <fr...@here.com> on 2016/04/22 16:42:45 UTC

Solr Max Query length

I used SolrJ and wrote a test to confirm that the max query length supported by Solr (by default) was 8192 in Solr 5.3.1
Based on the default Jetty settings


jetty.xml:    <Set name="requestHeaderSize"><Property name="solr.jetty.request.header.size" default="8192" /></Set>


The test would not work however until I had used a max size of 4096 (so the query passes at 4095 and returns a RemoteSolrException at 4097).


Is there another setting somewhere limiting the max query length?


-Frank

[cid:8D937273-A2BE-4FA2-9798-BF96569CE612]
Frank Kelly
Principal Software Engineer
Predictive Analytics Team (SCBE/HAC/CDA)






HERE
5 Wayside Rd, Burlington, MA 01803, USA
42° 29' 7" N 71° 11' 32" W

[cid:EE1A5D21-5E1F-4367-8C2D-9CDA6E290D85]<http://360.here.com/>  [cid:D08A4FC6-FF2D-49A9-81A7-18416A59A574] <https://twitter.com/here>   [cid:29AF1DC5-112C-41DC-9B44-45D77B7244B0] <https://www.facebook.com/here>    [cid:49338447-5524-432A-9DF5-410F280C84B5] <https://linkedin.com/company/heremaps>    [cid:3B33E3BD-D090-4FCD-B163-6F757AA6D2F8] <https://www.instagram.com/here>






Re: Solr Max Query length

Posted by Erick Erickson <er...@gmail.com>.
I do have to ask how you're generating 4k queries. I'f certainly seen
situations where this is a good thing, but that is a ginormous
query....

Best,
Erick

On Sat, Apr 23, 2016 at 6:55 AM, Kelly, Frank <fr...@here.com> wrote:
> Yes switching to the POST saved me from having to change Jetty settings
>
> Thanks for the pointer!
>
> -Frank
>
> Frank Kelly
> Principal Software Engineer
> Predictive Analytics Team (SCBE/HAC/CDA)
>
> HERE
> 5 Wayside Rd, Burlington, MA 01803, USA
> 42° 29' 7" N 71° 11' 32” W
>
>  <http://360.here.com/>   <https://twitter.com/here>
> <https://www.facebook.com/here>    <https://linkedin.com/company/heremaps>
>    <https://www.instagram.com/here>
>
>
>
>
>
>
>
> On 4/22/16, 11:29 AM, "Reth RM" <re...@gmail.com> wrote:
>
>>I'm not sure, may be this should work :
>>QueryResponse response = solr.query(q, METHOD.POST);
>>
>>Let's wait for others response.
>>
>>
>>
>>
>>On Fri, Apr 22, 2016 at 8:51 PM, Kelly, Frank <fr...@here.com>
>>wrote:
>>
>>> I am using the SolrJ library - does it have a way to specify one variant
>>> (POST) over the other (GET)?
>>>
>>> -Frank
>>>
>>>
>>>
>>>
>>> On 4/22/16, 11:13 AM, "Reth RM" <re...@gmail.com> wrote:
>>>
>>> >Are you using get instead of post?
>>> >
>>> >https://dzone.com/articles/solr-select-query-get-vs-post
>>> >
>>> >
>>> >
>>> >On Fri, Apr 22, 2016 at 8:12 PM, Kelly, Frank <fr...@here.com>
>>> >wrote:
>>> >
>>> >> I used SolrJ and wrote a test to confirm that the max query length
>>> >> supported by Solr (by default) was 8192 in Solr 5.3.1
>>> >> Based on the default Jetty settings
>>> >>
>>> >> jetty.xml:    <Set name="requestHeaderSize"><Property
>>> >> name="solr.jetty.request.header.size" default="8192" /></Set>
>>> >>
>>> >>
>>> >> The test would not work however until I had used a max size of 4096
>>>(so
>>> >> the query passes at 4095 and returns a RemoteSolrException at 4097).
>>> >>
>>> >>
>>> >> Is there another setting somewhere limiting the max query length?
>>> >>
>>> >>
>>> >> -Frank
>>> >>
>>> >> *Frank Kelly*
>>> >>
>>> >> Principal Software Engineer
>>> >>
>>> >> Predictive Analytics Team (SCBE/HAC/CDA)
>>> >>
>>> >>
>>> >> *HERE *
>>> >>
>>> >> 5 Wayside Rd, Burlington, MA 01803, USA
>>> >>
>>> >> *42° 29' 7" N 71° 11' 32² W*
>>> >>
>>> >>
>>> >> <http://360.here.com/>   <https://twitter.com/here>
>>> >> <https://www.facebook.com/here>
>>> >><https://linkedin.com/company/heremaps>
>>> >>   <https://www.instagram.com/here>
>>> >>
>>> >>
>>>
>>>
>

Re: Solr Max Query length

Posted by "Kelly, Frank" <fr...@here.com>.
Yes switching to the POST saved me from having to change Jetty settings

Thanks for the pointer!

-Frank

Frank Kelly
Principal Software Engineer
Predictive Analytics Team (SCBE/HAC/CDA)

HERE 
5 Wayside Rd, Burlington, MA 01803, USA
42° 29' 7" N 71° 11' 32” W

 <http://360.here.com/>   <https://twitter.com/here>
<https://www.facebook.com/here>    <https://linkedin.com/company/heremaps>
   <https://www.instagram.com/here>







On 4/22/16, 11:29 AM, "Reth RM" <re...@gmail.com> wrote:

>I'm not sure, may be this should work :
>QueryResponse response = solr.query(q, METHOD.POST);
>
>Let's wait for others response.
>
>
>
>
>On Fri, Apr 22, 2016 at 8:51 PM, Kelly, Frank <fr...@here.com>
>wrote:
>
>> I am using the SolrJ library - does it have a way to specify one variant
>> (POST) over the other (GET)?
>>
>> -Frank
>>
>>
>>
>>
>> On 4/22/16, 11:13 AM, "Reth RM" <re...@gmail.com> wrote:
>>
>> >Are you using get instead of post?
>> >
>> >https://dzone.com/articles/solr-select-query-get-vs-post
>> >
>> >
>> >
>> >On Fri, Apr 22, 2016 at 8:12 PM, Kelly, Frank <fr...@here.com>
>> >wrote:
>> >
>> >> I used SolrJ and wrote a test to confirm that the max query length
>> >> supported by Solr (by default) was 8192 in Solr 5.3.1
>> >> Based on the default Jetty settings
>> >>
>> >> jetty.xml:    <Set name="requestHeaderSize"><Property
>> >> name="solr.jetty.request.header.size" default="8192" /></Set>
>> >>
>> >>
>> >> The test would not work however until I had used a max size of 4096
>>(so
>> >> the query passes at 4095 and returns a RemoteSolrException at 4097).
>> >>
>> >>
>> >> Is there another setting somewhere limiting the max query length?
>> >>
>> >>
>> >> -Frank
>> >>
>> >> *Frank Kelly*
>> >>
>> >> Principal Software Engineer
>> >>
>> >> Predictive Analytics Team (SCBE/HAC/CDA)
>> >>
>> >>
>> >> *HERE *
>> >>
>> >> 5 Wayside Rd, Burlington, MA 01803, USA
>> >>
>> >> *42° 29' 7" N 71° 11' 32² W*
>> >>
>> >>
>> >> <http://360.here.com/>   <https://twitter.com/here>
>> >> <https://www.facebook.com/here>
>> >><https://linkedin.com/company/heremaps>
>> >>   <https://www.instagram.com/here>
>> >>
>> >>
>>
>>


Re: Solr Max Query length

Posted by Reth RM <re...@gmail.com>.
I'm not sure, may be this should work :
QueryResponse response = solr.query(q, METHOD.POST);

Let's wait for others response.




On Fri, Apr 22, 2016 at 8:51 PM, Kelly, Frank <fr...@here.com> wrote:

> I am using the SolrJ library - does it have a way to specify one variant
> (POST) over the other (GET)?
>
> -Frank
>
>
>
>
> On 4/22/16, 11:13 AM, "Reth RM" <re...@gmail.com> wrote:
>
> >Are you using get instead of post?
> >
> >https://dzone.com/articles/solr-select-query-get-vs-post
> >
> >
> >
> >On Fri, Apr 22, 2016 at 8:12 PM, Kelly, Frank <fr...@here.com>
> >wrote:
> >
> >> I used SolrJ and wrote a test to confirm that the max query length
> >> supported by Solr (by default) was 8192 in Solr 5.3.1
> >> Based on the default Jetty settings
> >>
> >> jetty.xml:    <Set name="requestHeaderSize"><Property
> >> name="solr.jetty.request.header.size" default="8192" /></Set>
> >>
> >>
> >> The test would not work however until I had used a max size of 4096 (so
> >> the query passes at 4095 and returns a RemoteSolrException at 4097).
> >>
> >>
> >> Is there another setting somewhere limiting the max query length?
> >>
> >>
> >> -Frank
> >>
> >> *Frank Kelly*
> >>
> >> Principal Software Engineer
> >>
> >> Predictive Analytics Team (SCBE/HAC/CDA)
> >>
> >>
> >> *HERE *
> >>
> >> 5 Wayside Rd, Burlington, MA 01803, USA
> >>
> >> *42° 29' 7" N 71° 11' 32² W*
> >>
> >>
> >> <http://360.here.com/>   <https://twitter.com/here>
> >> <https://www.facebook.com/here>
> >><https://linkedin.com/company/heremaps>
> >>   <https://www.instagram.com/here>
> >>
> >>
>
>

Re: Solr Max Query length

Posted by "Kelly, Frank" <fr...@here.com>.
I am using the SolrJ library - does it have a way to specify one variant
(POST) over the other (GET)?

-Frank




On 4/22/16, 11:13 AM, "Reth RM" <re...@gmail.com> wrote:

>Are you using get instead of post?
>
>https://dzone.com/articles/solr-select-query-get-vs-post
>
>
>
>On Fri, Apr 22, 2016 at 8:12 PM, Kelly, Frank <fr...@here.com>
>wrote:
>
>> I used SolrJ and wrote a test to confirm that the max query length
>> supported by Solr (by default) was 8192 in Solr 5.3.1
>> Based on the default Jetty settings
>>
>> jetty.xml:    <Set name="requestHeaderSize"><Property
>> name="solr.jetty.request.header.size" default="8192" /></Set>
>>
>>
>> The test would not work however until I had used a max size of 4096 (so
>> the query passes at 4095 and returns a RemoteSolrException at 4097).
>>
>>
>> Is there another setting somewhere limiting the max query length?
>>
>>
>> -Frank
>>
>> *Frank Kelly*
>>
>> Principal Software Engineer
>>
>> Predictive Analytics Team (SCBE/HAC/CDA)
>>
>>
>> *HERE *
>>
>> 5 Wayside Rd, Burlington, MA 01803, USA
>>
>> *42° 29' 7" N 71° 11' 32² W*
>>
>>
>> <http://360.here.com/>   <https://twitter.com/here>
>> <https://www.facebook.com/here>
>><https://linkedin.com/company/heremaps>
>>   <https://www.instagram.com/here>
>>
>>


Re: Solr Max Query length

Posted by Reth RM <re...@gmail.com>.
Are you using get instead of post?

https://dzone.com/articles/solr-select-query-get-vs-post



On Fri, Apr 22, 2016 at 8:12 PM, Kelly, Frank <fr...@here.com> wrote:

> I used SolrJ and wrote a test to confirm that the max query length
> supported by Solr (by default) was 8192 in Solr 5.3.1
> Based on the default Jetty settings
>
> jetty.xml:    <Set name="requestHeaderSize"><Property
> name="solr.jetty.request.header.size" default="8192" /></Set>
>
>
> The test would not work however until I had used a max size of 4096 (so
> the query passes at 4095 and returns a RemoteSolrException at 4097).
>
>
> Is there another setting somewhere limiting the max query length?
>
>
> -Frank
>
> *Frank Kelly*
>
> Principal Software Engineer
>
> Predictive Analytics Team (SCBE/HAC/CDA)
>
>
> *HERE *
>
> 5 Wayside Rd, Burlington, MA 01803, USA
>
> *42° 29' 7" N 71° 11' 32” W*
>
>
> <http://360.here.com/>   <https://twitter.com/here>
> <https://www.facebook.com/here>    <https://linkedin.com/company/heremaps>
>   <https://www.instagram.com/here>
>
>