I tried using POST but faced an issue where I am still not able to send long data. When I send data in the body that exceeds 35KB I get the following exception:
"An exception of type 'SolrNet.Exceptions.SolrConnectionException' occurred in [Myproject] but was not handled in user code Additional information: The request was aborted: The connection was closed unexpectedly." Any ideas why this is happening and how to resolve this? Regards, Salman On Mon, Feb 1, 2016 at 2:15 PM, Upayavira <u...@odoko.co.uk> wrote: > POST is supposed (as defined by REST) to imply a request with > side-effects. A query as such does not have side effects, so > conceptually, it should be a GET. In practice, whilst it might cause > some developers to grumble, using a POST for a request should make no > difference to Solr (other than accepting a larger query). > > Upayavira > > On Mon, Feb 1, 2016, at 11:05 AM, Midas A wrote: > > Is there any drawback of POST request and why we prefer GET. > > > > On Mon, Feb 1, 2016 at 1:08 PM, Salman Ansari <salman.rah...@gmail.com> > > wrote: > > > > > Cool. I would give POST a try. Any samples of using Post while passing > the > > > query string values (such as ORing between Solr field values) using > > > Solr.NET? > > > > > > Regards, > > > Salman > > > > > > On Sun, Jan 31, 2016 at 10:21 PM, Shawn Heisey <apa...@elyograg.org> > > > wrote: > > > > > > > On 1/31/2016 7:20 AM, Salman Ansari wrote: > > > > > I am building a long query containing multiple ORs between query > > > terms. I > > > > > started to receive the following exception: > > > > > > > > > > The remote server returned an error: (414) Request-URI Too Long. > Any > > > idea > > > > > what is the limit of the URL in Solr? Moreover, as a solution I was > > > > > thinking of chunking the query into multiple requests but I was > > > wondering > > > > > if anyone has a better approach? > > > > > > > > The default HTTP header size limit on most webservers and containers > > > > (including the Jetty that ships with Solr) is 8192 bytes. A typical > > > > request like this will start with "GET " and end with " HTTP/1.1", > which > > > > count against that 8192 bytes. The max header size can be increased. > > > > > > > > If you place the parameters into a POST request instead of on the > URL, > > > > then the default size limit of that POST request in Solr is 2MB. > This > > > > can also be increased. > > > > > > > > Thanks, > > > > Shawn > > > > > > > > > > > >