本文整理了Java中org.elasticsearch.script.Script.toString()
方法的一些代码示例,展示了Script.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Script.toString()
方法的具体详情如下:
包路径:org.elasticsearch.script.Script
类名称:Script
方法名:toString
暂无
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public String toString() {
return "script" + sScript.toString();
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public String toString() {
return "script(" + script.toString() + ")";
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public Similarity apply(Settings settings, Version indexCreatedVersion, ScriptService scriptService) {
boolean discountOverlaps = settings.getAsBoolean(SimilarityProviders.DISCOUNT_OVERLAPS, true);
Settings scriptSettings = settings.getAsSettings("script");
Script script = Script.parse(scriptSettings);
SimilarityScript.Factory scriptFactory = scriptService.compile(script, SimilarityScript.CONTEXT);
Settings weightScriptSettings = settings.getAsSettings("weight_script");
Script weightScript = null;
SimilarityWeightScript.Factory weightScriptFactory = null;
if (weightScriptSettings.isEmpty() == false) {
weightScript = Script.parse(weightScriptSettings);
weightScriptFactory = scriptService.compile(weightScript, SimilarityWeightScript.CONTEXT);
}
return new ScriptedSimilarity(
weightScript == null ? null : weightScript.toString(),
weightScriptFactory == null ? null : weightScriptFactory::newInstance,
script.toString(), scriptFactory::newInstance, discountOverlaps);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
@Override
public String toString() {
return "script(" + script.toString() + ")";
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
@Override
public String toString() {
return "script" + sScript.toString();
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
@Override
public String toString() {
return "script" + sScript.toString();
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public String toString() {
return "script" + sScript.toString();
}
代码示例来源:origin: harbby/presto-connectors
@Override
public String toString() {
return "script" + sScript.toString();
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public String toString() {
return "script(" + script.toString() + ")";
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
@Override
public Similarity apply(Settings settings, Version indexCreatedVersion, ScriptService scriptService) {
boolean discountOverlaps = settings.getAsBoolean(SimilarityProviders.DISCOUNT_OVERLAPS, true);
Settings scriptSettings = settings.getAsSettings("script");
Script script = Script.parse(scriptSettings);
SimilarityScript.Factory scriptFactory = scriptService.compile(script, SimilarityScript.CONTEXT);
Settings weightScriptSettings = settings.getAsSettings("weight_script");
Script weightScript = null;
SimilarityWeightScript.Factory weightScriptFactory = null;
if (weightScriptSettings.isEmpty() == false) {
weightScript = Script.parse(weightScriptSettings);
weightScriptFactory = scriptService.compile(weightScript, SimilarityWeightScript.CONTEXT);
}
return new ScriptedSimilarity(
weightScript == null ? null : weightScript.toString(),
weightScriptFactory == null ? null : weightScriptFactory::newInstance,
script.toString(), scriptFactory::newInstance, discountOverlaps);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Similarity apply(Settings settings, Version indexCreatedVersion, ScriptService scriptService) {
boolean discountOverlaps = settings.getAsBoolean(SimilarityProviders.DISCOUNT_OVERLAPS, true);
Settings scriptSettings = settings.getAsSettings("script");
Script script = Script.parse(scriptSettings);
SimilarityScript.Factory scriptFactory = scriptService.compile(script, SimilarityScript.CONTEXT);
Settings weightScriptSettings = settings.getAsSettings("weight_script");
Script weightScript = null;
SimilarityWeightScript.Factory weightScriptFactory = null;
if (weightScriptSettings.isEmpty() == false) {
weightScript = Script.parse(weightScriptSettings);
weightScriptFactory = scriptService.compile(weightScript, SimilarityWeightScript.CONTEXT);
}
return new ScriptedSimilarity(
weightScript == null ? null : weightScript.toString(),
weightScriptFactory == null ? null : weightScriptFactory::newInstance,
script.toString(), scriptFactory::newInstance, discountOverlaps);
}
代码示例来源:origin: com.scireum/sirius-search
private UpdateRequestBuilder buildUpdateRequestForReferencedFields(Entity parent,
Entity child,
boolean updateParent) {
UpdateRequestBuilder urb = index.getClient()
.prepareUpdate()
.setIndex(index.getIndex(getLocalClass()))
.setType(getLocalType())
.setRetryOnConflict(3)
.setId(child.getId());
EntityDescriptor descriptor = index.getDescriptor(getLocalClass());
if (descriptor.hasRouting()) {
Object routingKey = descriptor.getProperty(descriptor.getRouting()).writeToSource(child);
if (Strings.isEmpty(routingKey)) {
IndexAccess.LOG.WARN("Updating an entity of type %s (%s) without routing information!",
child.getClass().getName(),
child.getId());
} else {
urb.setRouting(String.valueOf(routingKey));
}
}
Script script = computeUpdateScript(parent, updateParent);
urb.setScript(script);
if (IndexAccess.LOG.isFINE()) {
IndexAccess.LOG.FINE("UPDATE: %s.%s: %s",
index.getIndex(getLocalClass()),
getLocalType(),
script.toString());
}
return urb;
}
内容来源于网络,如有侵权,请联系作者删除!