本文整理汇总了Java中org.elasticsearch.script.ScriptModule类的典型用法代码示例。如果您正苦于以下问题:Java ScriptModule类的具体用法?Java ScriptModule怎么用?Java ScriptModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ScriptModule类属于org.elasticsearch.script包,在下文中一共展示了ScriptModule类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createScriptModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
ScriptModule createScriptModule(List<ScriptPlugin> scriptPlugins) {
if (scriptPlugins == null || scriptPlugins.isEmpty()) {
return newTestScriptModule();
}
Settings settings = Settings.builder()
.put(Environment.PATH_HOME_SETTING.getKey(), createTempDir())
// no file watching, so we don't need a ResourceWatcherService
.put(ScriptService.SCRIPT_AUTO_RELOAD_ENABLED_SETTING.getKey(), false)
.build();
Environment environment = new Environment(settings);
return ScriptModule.create(settings, environment, null, scriptPlugins);
}
示例2: newTestScriptModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public static ScriptModule newTestScriptModule() {
Settings settings = Settings.builder()
.put(Environment.PATH_HOME_SETTING.getKey(), createTempDir())
// no file watching, so we don't need a ResourceWatcherService
.put(ScriptService.SCRIPT_AUTO_RELOAD_ENABLED_SETTING.getKey(), false)
.build();
Environment environment = new Environment(settings);
MockScriptEngine scriptEngine = new MockScriptEngine(MockScriptEngine.NAME, Collections.singletonMap("1", script -> "1"));
return new ScriptModule(settings, environment, null, singletonList(scriptEngine), emptyList());
}
示例3: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(ScriptModule module) {
// Register each script that we defined in this plugin
module.registerScript("hamming_distance", HammingDistanceScriptFactory.class);
}
开发者ID:scirag,项目名称:elastic-search-hamming-distance-plugin,代码行数:5,代码来源:HammingDistanceNativeScriptPlugin.java
示例4: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(ScriptModule scriptModule) {
scriptModule.registerScript(PLUGIN_NAME, HammingDistanceScriptFactory.class);
}
示例5: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(ScriptModule scriptModule) {
scriptModule.registerScript(PLUGIN_NAME, AutoColourCorrelogramDistanceScriptFactory.class);
}
开发者ID:CameraForensics,项目名称:elasticsearch-plugins,代码行数:4,代码来源:AutoColourCorrelogramDistancePlugin.java
示例6: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(ScriptModule scriptModule) {
scriptModule.registerScript(PLUGIN_NAME, EuclideanDistanceScriptFactory.class);
}
示例7: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(final ScriptModule module) {
module.registerScript(ContentAuthPluginScript.NAME, ContentAuthPluginScriptFactory.class);
}
示例8: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(ScriptModule module) {
module.addScriptEngine(NashornScriptEngineService.class);
}
示例9: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(ScriptModule module) {
// Register each script that we defined in this plugin
module.registerScript(JoinerScript.SCRIPT_NAME, JoinerScript.Factory.class);
}
示例10: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(ScriptModule module) {
// Register each script that we defined in this plugin
module.registerScript(UpdaterScript.SCRIPT_NAME, UpdaterScript.Factory.class);
}
示例11: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(ScriptModule module) {
// Register each script that we defined in this plugin
module.registerScript("entity-resolution", EntityResolutionScript.Factory.class);
}
示例12: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(ScriptModule module) {
module.addScriptEngine(JavaEngineService.class);
}
示例13: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
/**
* Old-style guice scripting extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading
* from 2.x.
*
* @deprecated implement {@link ScriptPlugin} instead
*/
@Deprecated
public final void onModule(ScriptModule module) {}
示例14: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
/**
* Initializes the lucene scripts used by NLP-TAB. Called by Elasticsearch using reflection.
*
* @param scriptModule injected script module.
* @see Plugin
*/
@SuppressWarnings("unused")
public void onModule(ScriptModule scriptModule) {
scriptModule.registerScript("annotationDistance", AnnotationDistanceScriptFactory.class);
}