Class QueryRequest.Builder
- All Implemented Interfaces:
WithJson<QueryRequest.Builder>,ObjectBuilder<QueryRequest>
- Enclosing class:
- QueryRequest
QueryRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal QueryRequest.BuilderallowPartialResults(Boolean value) Iftrue, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.build()Builds aQueryRequest.final QueryRequest.BuilderBy default, ES|QL returns results as rows.final QueryRequest.BuilderThe character to use between values within a CSV row.final QueryRequest.BuilderdropNullColumns(Boolean value) Should columns that are entirelynullbe removed from thecolumnsandvaluesportion of the results? Defaults tofalse.final QueryRequest.BuilderSpecify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.final QueryRequest.Builderfilter(QueryVariant value) Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.final QueryRequest.BuilderSpecify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.final QueryRequest.Builderformat(EsqlFormat value) A short version of the Accept header, e.g.final QueryRequest.BuilderincludeCcsMetadata(Boolean value) When set totrueand performing a cross-cluster/cross-project query, the response will include an extra_clustersobject with information about the clusters that participated in the search along with info such as shards count.final QueryRequest.BuilderAPI name:localefinal QueryRequest.Builderparams(boolean value, boolean... values) To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.Builderparams(double value, double... values) To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.Builderparams(long value, long... values) To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.Builderparams(FieldValue value, FieldValue... values) To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.BuilderTo avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.BuilderTo avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.Builderparams(List<FieldValue> list) To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.BuilderIf provided andtruethe response will include an extraprofileobject with information on how the query was executed.final QueryRequest.BuilderRequired - The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.protected QueryRequest.Builderself()final QueryRequest.Buildertables(String key, Map<String, TableValues> value) Tables to use with the LOOKUP operation.final QueryRequest.BuilderTables to use with the LOOKUP operation.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowPartialResults
Iftrue, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. Iffalse, the query will fail if there are any failures.To override the default behavior, you can set the
esql.query.allow_partial_resultscluster setting tofalse.API name:
allow_partial_results -
columnar
By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results.API name:
columnar -
delimiter
The character to use between values within a CSV row. Only valid for the CSV format.API name:
delimiter -
dropNullColumns
Should columns that are entirelynullbe removed from thecolumnsandvaluesportion of the results? Defaults tofalse. Iftruethen the response will include an extra section under the nameall_columnswhich has the name of all columns.API name:
drop_null_columns -
filter
Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.API name:
filter -
filter
Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.API name:
filter -
filter
Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.API name:
filter -
format
A short version of the Accept header, e.g. json, yaml.csv,tsv, andtxtformats will return results in a tabular format, excluding other metadata fields from the response.API name:
format -
includeCcsMetadata
When set totrueand performing a cross-cluster/cross-project query, the response will include an extra_clustersobject with information about the clusters that participated in the search along with info such as shards count.API name:
include_ccs_metadata -
locale
API name:locale -
params
To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.API name:
paramsAdds all elements of
listtoparams. -
params
To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.API name:
paramsAdds one or more values to
params. -
params
To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.API name:
paramsAdds one or more values to
params. -
params
To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.API name:
paramsAdds one or more values to
params. -
params
To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.API name:
paramsAdds one or more values to
params. -
params
To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.API name:
paramsAdds one or more values to
params. -
params
To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.API name:
paramsAdds a value to
paramsusing a builder lambda. -
profile
If provided andtruethe response will include an extraprofileobject with information on how the query was executed. This information is for human debugging and its format can change at any time but it can give some insight into the performance of each part of the query.API name:
profile -
query
Required - The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.API name:
query -
tables
Tables to use with the LOOKUP operation. The top level key is the table name and the next level key is the column name.API name:
tablesAdds all entries of
maptotables. -
tables
Tables to use with the LOOKUP operation. The top level key is the table name and the next level key is the column name.API name:
tablesAdds an entry to
tables. -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<QueryRequest.Builder>
-
build
Builds aQueryRequest.- Specified by:
buildin interfaceObjectBuilder<QueryRequest>- Throws:
NullPointerException- if some of the required fields are null.
-