org.elasticsearch.search.builder.SearchSourceBuilder.scriptField()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(328)

本文整理了Java中org.elasticsearch.search.builder.SearchSourceBuilder.scriptField()方法的一些代码示例,展示了SearchSourceBuilder.scriptField()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SearchSourceBuilder.scriptField()方法的具体详情如下:
包路径:org.elasticsearch.search.builder.SearchSourceBuilder
类名称:SearchSourceBuilder
方法名:scriptField

SearchSourceBuilder.scriptField介绍

[英]Adds a script field under the given name with the provided script.
[中]使用提供的脚本在给定名称下添加脚本字段。

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

/**
 * Adds a script field under the given name with the provided script.
 *
 * @param name
 *            The name of the field
 * @param script
 *            The script
 */
public SearchSourceBuilder scriptField(String name, Script script) {
  scriptField(name, script, false);
  return this;
}

代码示例来源:origin: spring-projects/spring-data-elasticsearch

searchRequest.source().scriptField(scriptedField.fieldName(), scriptedField.script());

代码示例来源:origin: org.elasticsearch/elasticsearch

/**
 * Adds a script based field to load and return. The field does not have to be stored,
 * but its recommended to use non analyzed or numeric fields.
 *
 * @param name   The name that will represent this value in the return hit
 * @param script The script to use
 */
public SearchRequestBuilder addScriptField(String name, Script script) {
  sourceBuilder().scriptField(name, script);
  return this;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Adds a script field under the given name with the provided script.
 *
 * @param name
 *            The name of the field
 * @param script
 *            The script
 */
public SearchSourceBuilder scriptField(String name, Script script) {
  scriptField(name, script, false);
  return this;
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Adds a script field under the given name with the provided script.
 *
 * @param name
 *            The name of the field
 * @param script
 *            The script
 */
public SearchSourceBuilder scriptField(String name, Script script) {
  scriptField(name, script, false);
  return this;
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Adds a script field under the given name with the provided script.
 *
 * @param name
 *            The name of the field
 * @param script
 *            The script
 */
public SearchSourceBuilder scriptField(String name, Script script) {
  scriptField(name, script, false);
  return this;
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Adds a script based field to load and return. The field does not have to be stored,
 * but its recommended to use non analyzed or numeric fields.
 *
 * @param name   The name that will represent this value in the return hit
 * @param script The script to use
 */
public SearchRequestBuilder addScriptField(String name, Script script) {
  sourceBuilder().scriptField(name, script);
  return this;
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Adds a script based field to load and return. The field does not have to be stored,
 * but its recommended to use non analyzed or numeric fields.
 *
 * @param name   The name that will represent this value in the return hit
 * @param script The script to use
 */
public TopHitsBuilder addScriptField(String name, Script script) {
  sourceBuilder().scriptField(name, script);
  return this;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Adds a script based field to load and return. The field does not have to be stored,
 * but its recommended to use non analyzed or numeric fields.
 *
 * @param name   The name that will represent this value in the return hit
 * @param script The script to use
 */
public SearchRequestBuilder addScriptField(String name, Script script) {
  sourceBuilder().scriptField(name, script);
  return this;
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Adds a script based field to load and return. The field does not have to be stored,
 * but its recommended to use non analyzed or numeric fields.
 *
 * @param name   The name that will represent this value in the return hit
 * @param script The script to use
 */
public T addScriptField(String name, Script script) {
  sourceBuilder().scriptField(name, script);
  return (T) this;
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Adds a script based field to load and return. The field does not have to be stored,
 * but its recommended to use non analyzed or numeric fields.
 *
 * @param name   The name that will represent this value in the return hit
 * @param script The script to use
 */
public SearchRequestBuilder addScriptField(String name, Script script) {
  sourceBuilder().scriptField(name, script);
  return this;
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Adds a script based field to load and return. The field does not have to be stored,
 * but its recommended to use non analyzed or numeric fields.
 *
 * @param name   The name that will represent this value in the return hit
 * @param script The script to use
 */
public SearchRequestBuilder addScriptField(String name, Script script) {
  sourceBuilder().scriptField(name, script);
  return this;
}

代码示例来源:origin: javanna/elasticshell

public SearchRequestBuilder<JsonInput, JsonOutput> scriptField(String name, String script, Map<String, Object> params) {
  sourceBuilder().scriptField(name, script, params);
  return this;
}

代码示例来源:origin: javanna/elasticshell

public SearchRequestBuilder<JsonInput, JsonOutput> scriptField(String name, String script) {
  sourceBuilder().scriptField(name, script);
  return this;
}

代码示例来源:origin: javanna/elasticshell

public SearchRequestBuilder<JsonInput, JsonOutput> scriptField(String name, String lang, String script, Map<String, Object> params) {
  sourceBuilder().scriptField(name, lang, script, params);
  return this;
}

代码示例来源:origin: org.elasticsearch/elasticsearch

groupSource.scriptField(field.fieldName(), field.script());

代码示例来源:origin: VanRoy/spring-data-jest

searchSourceBuilder.scriptField(scriptedField.fieldName(), scriptedField.script());

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

groupSource.scriptField(field.fieldName(), field.script());

代码示例来源:origin: apache/servicemix-bundles

groupSource.scriptField(field.fieldName(), field.script());

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

groupSource.scriptField(field.fieldName(), field.script());

相关文章

微信公众号

最新文章

更多

SearchSourceBuilder类方法