lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohit" <>
Subject RE: SolrJ + Post
Date Sat, 15 Oct 2011 05:30:18 GMT
Ya the problem is with the length of the URL, with a lot of filters coming
in the length goes beyond the length allowed. But, I guess extending url
length would be a better approcach.


-----Original Message-----
From: Sujit Pal [] 
Sent: 14 October 2011 16:54
Subject: Re: SolrJ + Post

Not the OP, but I put it in on /one/ of my solr custom handlers that
acts as a proxy to itself (ie the server its part of). It basically
rewrites the incoming query (usually short 50-250 chars at most) to a
set of very long queries and passes them in parallel to the server,
gathers up the results and returns a combo response. 

The logging is not an issue for me since the handler logs the expanded
query before sending it off, but the caching is. Thank you for pointing
it out.

I was doing it because I was running afoul of the limit on the URL size
(and the max boolean clauses as well, but I reset the max for that). But
I just realized that we can probably reset that limit as well as this
page shows:

So perhaps if the URL length is the reason for the OP's question,
increasing it may be a better option than using POST?


On Fri, 2011-10-14 at 09:30 -0700, Walter Underwood wrote:
> Why do you want to use POST? It is the wrong HTTP request type for search
> GET is for retrieving information from the server, POST is for changing
information on the server.
> POST responses cannot be cached (see HTTP spec).
> POST requests do not include the arguments in the log, which makes your
HTTP logs nearly useless for diagnosing problems.
> wunder
> Walter Underwood
> On Oct 14, 2011, at 9:20 AM, Sujit Pal wrote:
> > If you use the CommonsHttpSolrServer from your client (not sure about
> > the other types, this is the one I use), you can pass the method as an
> > argument to its query() method, something like this:
> > 
> > QueryResponse rsp = server.query(params, METHOD.POST);
> > 
> > HTH
> > Sujit
> > 
> > On Fri, 2011-10-14 at 13:29 +0000, Rohit wrote:
> >> I want to user POST instead of GET while using solrj, but I am unable
> >> find a clear example for it. If anyone has implemented the same it
would be
> >> nice to get some insight.
> >> 
> >> 
> >> 
> >> Regards,
> >> 
> >> Rohit
> >> 
> >> Mobile: +91-9901768202
> >> 
> >> About Me:  <>
> >> 

View raw message