Hi guys, I need a little help. Ante in ElasticSearch version 2.4 to add several scripts to a plugin was with 'module.registerScript ()' now in version 6.6 how should I add my various scripts? I have not found the way it should be. A little help would be good. Greetings.
My Code GitHub: https://github.com/EliuFlorez/recurring-plugin
before plugin:
package org.devmaster.elasticsearch.plugin;
import org.devmaster.elasticsearch.index.mapper.RecurringFieldMapper;
import org.devmaster.elasticsearch.script.*;
import org.elasticsearch.indices.IndicesModule;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.script.ScriptModule;
public class RecurringPlugin extends Plugin {
public String name() {
return "native-recurring-plugin";
}
public String description() {
return "Native script to allow recurring feature";
}
public void onModule(ScriptModule module) {
module.registerScript(NextOccurrenceSearchScript.SCRIPT_NAME, NextOccurrenceSearchScript.Factory.class);
module.registerScript(HasOccurrencesAtSearchScript.SCRIPT_NAME, HasOccurrencesAtSearchScript.Factory.class);
module.registerScript(OccurBetweenSearchScript.SCRIPT_NAME, OccurBetweenSearchScript.Factory.class);
module.registerScript(NotHasExpiredSearchScript.SCRIPT_NAME, NotHasExpiredSearchScript.Factory.class);
module.registerScript(OccurrencesBetweenSearchScript.SCRIPT_NAME, OccurrencesBetweenSearchScript.Factory.class);
module.registerScript(HasAnyOccurrenceBetweenSearchScript.SCRIPT_NAME, HasAnyOccurrenceBetweenSearchScript.Factory.class);
}
public void onModule(IndicesModule module) {
module.registerMapper(RecurringFieldMapper.CONTENT_TYPE, new RecurringFieldMapper.TypeParser());
}
}
now plugin:
???????????????????????????????????