codelibs / elasticsearch-cluster-runner

Elasticsearch Cluster Launcher on One JVM Instance
Other
66 stars 17 forks source link

wrong package for ReindexPlugin in 7.17.9.0 #55

Open jpandres opened 2 months ago

jpandres commented 2 months ago

Hi there, I was facing an exception while running integration tests in my springboot application. It seemed it was constructing the client requests with doctype which is not supported in 7.x+. After investigating I found out that it could be solved by appying the ReindexPlugin. Looking at the code in org.codelibs.elasticsearch.runner.ElasticsearchClusterRunner I saw that you were applying it but with wrong package.

You preload this:

public static final String[] MODULE_TYPES = new String[] { //
            "org.elasticsearch.search.aggregations.matrix.MatrixAggregationPlugin", //
            "org.elasticsearch.analysis.common.CommonAnalysisPlugin", //
            "org.elasticsearch.geo.GeoPlugin", //
            "org.elasticsearch.ingest.common.IngestCommonPlugin", //
            // "org.elasticsearch.ingest.geoip.IngestGeoIpPlugin", //
            "org.elasticsearch.ingest.useragent.IngestUserAgentPlugin", //
            "org.elasticsearch.kibana.KibanaPlugin", //
            "org.elasticsearch.script.expression.ExpressionPlugin", //
            "org.elasticsearch.script.mustache.MustachePlugin", //
            "org.elasticsearch.painless.PainlessPlugin", //
            "org.elasticsearch.index.mapper.MapperExtrasPlugin", //
            "org.elasticsearch.join.ParentJoinPlugin", //
            "org.elasticsearch.percolator.PercolatorPlugin", //
            "org.elasticsearch.index.rankeval.RankEvalPlugin", //
            "org.elasticsearch.index.reindex.ReindexPlugin", //
            "org.elasticsearch.plugin.repository.url.URLRepositoryPlugin", //
            "org.elasticsearch.tasksplugin.TasksPlugin", //
            "org.elasticsearch.transport.Netty4Plugin" //
    };

but in your jar the ReindexPlugin have the following path: 'org.elasticsearch.reindex.ReindexPlugin'. I passed that in the config for creating the runner and works. Maybe you want to fix this in your code and review the rest of plugins?

Keep up the good work!

Cheers,

juan