Plugin development docs


(Vinicius Carvalho) #1

Is there an official documentation for plugin development or looking at
other's source code still the best place?

I'm starting a new plugin, but I'm a bit lost without a javadoc or a guide
to start. Any pointers?

Regards

--


(Vinicius Carvalho) #2

Sorry for bumping up this topic, but I'm looking at other's plugins to
figure out how to create mine :). But one thing I could not find is an easy
way to test the plugin. So far I'm depending on installing and using the
logger to see if its working :frowning:

I'm relying on unit testing, but I'd like to use an integration test to
maybe bootstrap a node and install my plugin and test it.

Has anyone here managed to do something like this before?

Regards

On Thursday, September 6, 2012 11:05:21 PM UTC-4, Vinicius Carvalho wrote:

Is there an official documentation for plugin development or looking at
other's source code still the best place?

I'm starting a new plugin, but I'm a bit lost without a javadoc or a guide
to start. Any pointers?

Regards

--


(David Pilato) #3

Hi Vinicius,

You could look at :
https://github.com/dadoonet/rssriver/blob/master/src/test/java/org/elasticsearch/river/rss/RssRiverTest.java
And mother classes :
https://github.com/dadoonet/rssriver/blob/master/src/test/java/org/elasticsearch/river/rss/AbstractRssRiverSimpleTest.java
https://github.com/dadoonet/rssriver/blob/master/src/test/java/org/elasticsearch/river/rss/AbstractRssRiverTest.java

When you start a node from a test, it detects your plugin in classpath as you have this file in your project: src/main/resources/es-plugin.properties

So, you can create whatever you want using your plugin, index and search for docs.

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 9 sept. 2012 à 01:05, Vinicius Carvalho viniciusccarvalho@gmail.com a écrit :

Sorry for bumping up this topic, but I'm looking at other's plugins to figure out how to create mine :). But one thing I could not find is an easy way to test the plugin. So far I'm depending on installing and using the logger to see if its working :frowning:

I'm relying on unit testing, but I'd like to use an integration test to maybe bootstrap a node and install my plugin and test it.

Has anyone here managed to do something like this before?

Regards

On Thursday, September 6, 2012 11:05:21 PM UTC-4, Vinicius Carvalho wrote:
Is there an official documentation for plugin development or looking at other's source code still the best place?

I'm starting a new plugin, but I'm a bit lost without a javadoc or a guide to start. Any pointers?

Regards

--


(Mohit Chawla) #4

Hello,

On Fri, Sep 7, 2012 at 8:35 AM, Vinicius Carvalho
viniciusccarvalho@gmail.com wrote:

I'm starting a new plugin, but I'm a bit lost without a javadoc or a guide
to start. Any pointers?

This nicely written example by Jorg Prante might be helpful:
http://jprante.github.com/lessons/2012/03/27/Writing-a-simple-plugin-for-Elasticsearch.html

--


(Brad Voth) #5

javadocs can be created through the javadoc:javadoc maven goal. I found
this the other day and they have helped tremendously with my work.

On Thursday, September 6, 2012 11:05:21 PM UTC-4, Vinicius Carvalho wrote:

Is there an official documentation for plugin development or looking at
other's source code still the best place?

I'm starting a new plugin, but I'm a bit lost without a javadoc or a guide
to start. Any pointers?

Regards

--


(system) #6