Elastic Search Pluggable REST End point (POST)

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

--

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

Tutorial:

Code: GitHub - brusic/elasticsearch-hello-world-plugin: Tutorial on how to create a new REST endpoint in elasticsearch

Tutorial:
http://jprante.github.com/lessons/2012/03/27/Writing-a-simple-plugin-for-Elasticsearch.html
Code: GitHub - jprante/elasticsearch-index-termlist: Elasticsearch Index Termlist

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
pras.success@gmail.comwrote:

Hi All,

I am new to Elasticsearch 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

--

--

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