本文整理汇总了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);
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:AbstractQueryTestCase.java
示例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());
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:ESTestCase.java
示例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);
}
开发者ID:CameraForensics,项目名称:elasticsearch-plugins,代码行数:4,代码来源:HammingDistancePlugin.java
示例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);
}
开发者ID:CameraForensics,项目名称:elasticsearch-plugins,代码行数:4,代码来源:EuclideanDistancePlugin.java
示例7: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(final ScriptModule module) {
module.registerScript(ContentAuthPluginScript.NAME, ContentAuthPluginScriptFactory.class);
}
开发者ID:sonatype,项目名称:nexus-public,代码行数:4,代码来源:ContentAuthPlugin.java
示例8: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(ScriptModule module) {
module.addScriptEngine(NashornScriptEngineService.class);
}
开发者ID:jprante,项目名称:elasticsearch-lang-javascript-nashorn,代码行数:4,代码来源:NashornPlugin.java
示例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);
}
开发者ID:sutoiku,项目名称:elasticsearch-native-script-joiner,代码行数:5,代码来源:NativeScriptJoinerPlugin.java
示例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);
}
开发者ID:sutoiku,项目名称:elasticsearch-native-script-updater,代码行数:5,代码来源:NativeScriptUpdaterPlugin.java
示例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);
}
开发者ID:YannBrrd,项目名称:elasticsearch-entity-resolution,代码行数:5,代码来源:EntityResolutionPlugin.java
示例12: onModule
import org.elasticsearch.script.ScriptModule; //导入依赖的package包/类
public void onModule(ScriptModule module) {
module.addScriptEngine(JavaEngineService.class);
}
开发者ID:btiernay,项目名称:elasticsearch-lang-java,代码行数:4,代码来源:JavaPlugin.java
示例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) {}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:Plugin.java
示例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);
}
开发者ID:nlpie,项目名称:nlptab,代码行数:11,代码来源:NlptabPlugin.java
注:本文中的org.elasticsearch.script.ScriptModule类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论