I had a similar issue. 
I manged to get the parameters from the post by doing:











@Override

public void handleRequest(final RestRequest request, final RestChannel 
channel) {

  Map<String,String> params = new HashMap<String, String>();
    RestUtils.decodeQueryString(request.content().toUtf8(), 0, params);
    String paramValue = params.get("parameter");

//DO SOMETHING

}




Notice that the json query you want to pass in doesn't need to be encoded 
on the client side (with an Http.GET it needs to be)


Hope that helps


On Thursday, January 31, 2013 10:03:33 AM UTC-8, AlexR wrote:
>
>
> I am already doing it with GET and source parameter and it works well. One 
> huge benefit is that size and start (and hopefully sort but have not tested 
> it yet) url parameters override whatever is in source={...} - big help 
> integrating with UI components that manage paging and generate these http 
> parameters 
>
> Now the problem is that for all practical purposes uri length is limited 
> to 2000 characters so GET may very well fail with bigger queries (as I said 
> query with facet based "filtered", facets themselves, filters.... can get 
> pretty long plus of course url-encoding of all spaces and {} ) 
>
> I wish the same functionality were available via POST. Couldn't ES check 
> encoding in POST header and if it is *application/x-www-form-urlencoded *just 
> extract encoded parameters and use source parameter just like it does with 
> GET?
>
> Do you think I should put an enhancement request into Git?
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/bddfebfc-519f-4320-b8aa-024849ae0c31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to