Java Code Examples for org.elasticsearch.action.support.QuerySourceBuilder#buildAsBytes()

The following examples show how to use org.elasticsearch.action.support.QuerySourceBuilder#buildAsBytes() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExistsRequest.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
/**
 * The source to execute.
 */
public ExistsRequest source(QuerySourceBuilder sourceBuilder) {
    this.source = sourceBuilder.buildAsBytes(Requests.CONTENT_TYPE);
    return this;
}
 
Example 2
Source File: CountRequest.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
/**
 * The source to execute.
 */
public CountRequest source(QuerySourceBuilder sourceBuilder) {
    this.source = sourceBuilder.buildAsBytes(Requests.CONTENT_TYPE);
    return this;
}
 
Example 3
Source File: ValidateQueryRequest.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
public ValidateQueryRequest source(QuerySourceBuilder sourceBuilder) {
    this.source = sourceBuilder.buildAsBytes(Requests.CONTENT_TYPE);
    return this;
}
 
Example 4
Source File: ExplainRequest.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
public ExplainRequest source(QuerySourceBuilder sourceBuilder) {
    this.source = sourceBuilder.buildAsBytes(Requests.CONTENT_TYPE);
    return this;
}