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

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

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

SearchSourceBuilder.fields介绍

[英]Sets the fields to load and return as part of the search request. If none are specified, the source of the document will be returned.
[中]设置要作为搜索请求的一部分加载和返回的字段。如果未指定,将返回文档的来源。

代码示例

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

/**
 * Adds the fields to load and return as part of the search request. If none are specified,
 * the source of the document will be returned.
 */
public SearchRequestBuilder addFields(String... fields) {
  sourceBuilder().fields(fields);
  return this;
}

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

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

代码示例来源:origin: mattweber/elasticsearch-mocksolrplugin

searchSourceBuilder.noFields();
} else {
  searchSourceBuilder.fields(fl.split("\\s|,"));

代码示例来源:origin: org.elasticsearch.plugin/delete-by-query

.fields("_routing", "_parent")
.sort("_doc") // important for performance
.fetchSource(false)

相关文章

微信公众号

最新文章

更多

SearchSourceBuilder类方法