Elasticsearch analysis stempel plugin - support for ES 2.X

Hi,

I'm using the elasticsearch-analysis-stempel plugin (for polish language) with ES 1.7 version.

Everything works great. I'm using it for some integration tests as plugin for embedded nodes started during tests (the plugin is detected from classpath in this case) and as external plugin on standalone nodes.

On the last week we've started the migration to ES 2.X.

Is there a version of analysis-stempel which support ES 2.X ? When I was trying to install that plugin for standalone ES 2.1 I've got the error:

plugin install elasticsearch/elasticsearch-analysis-stempel/2.7.0
-> Installing elasticsearch/elasticsearch-analysis-stempel/2.7.0...
Trying https://download.elastic.co/elasticsearch/elasticsearch-analysis-stempel/elasticsearch-analysis-stempel-2.7.0.zip ...
Downloading ................................DONE
Verifying https://download.elastic.co/elasticsearch/elasticsearch-analysis-stempel/elasticsearch-analysis-stempel-2.7.0.zip checksums if available ...
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
ERROR: Could not find plugin descriptor 'plugin-descriptor.properties' in plugin zip

Is there a release date / plan for support Elasticsearch 2.X?
Will it support the classpath usage for embedded node?

Regards,
Przemyslaw

Supported. Read: https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-stempel.html

Thanks - it works for standalone node!

But I have the second question: is there a possibility to use the plugin on classpath for embedded node?

It worked for version 1.x but stopped working for 2.x (I have some integration tests with this plugin with embedded node).

I've seen the topic about that (https://discuss.elastic.co/t/add-plugins-from-classpath-in-embedded-elasticsearch-client-node/36269/7) but haven't seen any suggestion how to deal with this problem.

Do you consider any way to support this case?

Thanks,
Przemyslaw

Embedding a node is not recommended in production.

But you can add your own Node class which extends Node and offers adding your plugins. I have seen some examples on discuss.

Hi,

I'm not using the embedded node for production but only for integration testing (and I want to test analyzer which is not on the ES core unfortunately).

Regarding the suggestions of class which extend the Node.

For ES 2.1 the the constructor with settings, version and classpath plugin is not available outside the package org.elasticsearch.node (so you example from that different topic works only on your tests).

For ES 2.2 that solution works. I will add the code. Maybe it will be helpful for somebody

private class NodeWithPlugins extends Node {
    protected NodeWithPlugins(Environment tmpEnv, Version version, Collection<Class<? extends Plugin>> classpathPlugins) {
        super(tmpEnv, version, classpathPlugins);
    }
}

// we are using Spring 
private Client createNodeClient() throws Exception {
    Settings.Builder settingsBuilder = Settings.settingsBuilder();
    settingsBuilder.put(createProperties());
    settingsBuilder.put("node.local", "true");
    settingsBuilder.put("cluster.name", clusterName);
    Settings settings = settingsBuilder.build();
    Node node = new NodeWithPlugins(InternalSettingsPreparer.prepareEnvironment(settings, null), Version.CURRENT,
                                    singletonList(AnalysisStempelPlugin.class)).start();

    this.releasable = node;
    return node.client();
}

PS. In my opinion there should be easy way to run embedded node according with rule "run project on developer machine by a single command". The production is a totally different case and I agree with you that the embedded node is not a best way to do that.