本文整理了Java中org.elasticsearch.search.builder.SearchSourceBuilder.fields()
方法的一些代码示例,展示了SearchSourceBuilder.fields()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SearchSourceBuilder.fields()
方法的具体详情如下:
包路径:org.elasticsearch.search.builder.SearchSourceBuilder
类名称: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)
内容来源于网络,如有侵权,请联系作者删除!