Elastic Search Pluggable REST End point (POST)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Elastic Search Pluggable REST End point (POST)

Prasanna Paulraj
Hi All,

I am new to elastic search and I am trying to develop a pluggable rest end point. Can some one point me to some tutorial or info on how to work with POST request. I got some examples but they are for GET request. Couldn't find any thing for POST.

Thanks,
Prasanna

--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Elastic Search Pluggable REST End point (POST)

Ivan Brusic
Both Jörg Prante and I have written tutorials on the subject.



The Action class, which is bound to the RestModule via the plugin, will register various action  with the rest controller. Using my code as an example:


controller.registerHandler(GET, "/_hello/", this);
controller.registerHandler(GET, "/_hello/{name}", this);


You would need to simply define these as POST and not GET.

Hope this helps,

Ivan


On Wed, Dec 12, 2012 at 10:52 AM, Prasanna Paulraj <[hidden email]> wrote:
Hi All,

I am new to elastic search and I am trying to develop a pluggable rest end point. Can some one point me to some tutorial or info on how to work with POST request. I got some examples but they are for GET request. Couldn't find any thing for POST.

Thanks,
Prasanna

--
 
 

--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Elastic Search Pluggable REST End point (POST)

Alexandra
This post has NOT been accepted by the mailing list yet.
Hei,

I'm also trying to write a custom plugin , which can also be called straight from java with a transport client. My plugin only needs to use existing features like search, analyze ( I'm building it in order to go less to es and do everything on the server side ).

In the BaseRestHandler class I can easily access the client. But when I'm trying to build the hierarchy for the java execution ( action, request, response, builder ) I don't have access to a client which exposes to me all these actions.
It's not clear to me which base classes should I extend in order to be able to use it. Also, I don't need to do something specific for each shard, I would like the client to handle everything.

Is it possible to do this ? Can you please point me in the right direction because I've been struggling with this for days now.

Thanks,
Alexandra