lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven White <swhite4...@gmail.com>
Subject Re: Is copyField a must?
Date Mon, 18 May 2015 00:49:35 GMT
Thanks Garth and all.

To close the loop on this inquiry: I tested this in my application and
found that Solr does support POST.  In fact, you can take all the
parameters you pass in the URL, such as q, fq, etc. and put them as-is in
the payload of the POST and as long as you have
"application/x-www-form-urlencoded" set as your content-type nothing else
need to change.

One thing I found kinda odd is be it I encode my data or not, it still
works!  Passing "q=*:*" or "q=*%3A*" both work.

Steve

On Thu, May 14, 2015 at 4:51 PM, Garth Grimm <gdgrimm@yahoo.com.invalid>
wrote:

> Yes, it does support POST.  As to format, I believe that's handled by the
> container.  So if you're url-encoding the parameter values, you'll probably
> need to set Content-Type: application/x-www-form-urlencoded for the HTTP
> POST header.
>
> -----Original Message-----
> From: Steven White [mailto:swhite4141@gmail.com]
> Sent: Thursday, May 14, 2015 3:12 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Is copyField a must?
>
> Anyone knows the answer to Shawn's question?  Does Solr support POST
> request and is the format the same as GET?
>
> If it does than it means I don't have to create multiple request handlers.
>
> Thanks
>
> Steve
>
> On Wed, May 13, 2015 at 6:02 PM, Shawn Heisey <apache@elyograg.org> wrote:
>
> > On 5/13/2015 3:36 PM, Steven White wrote:
> > > Note, I want to avoid a URL base solution (sending the list of
> > > fields
> > over
> > > HTTP) because the list of fields could be large (1000+) and thus I
> > > will exceed GET limit quickly (does Solr support POST for searching,
> > > if so,
> > than
> > > I can use URL base solution?)
> >
> > Solr does indeed support a query sent as the body in a POST request.
> > I'm not completely positive, but I think you'd use the same format as
> > you put on the URL:
> >
> > q=foo&rows=1&fq=bar
> >
> > If anyone knows for sure what should be in the POST body, please let
> > me and Steven know.  In particular, should the content be URL escaped,
> > as might be required for a GET?
> >
> > Thanks,
> > Shawn
> >
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message