Class QueryRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<QueryRequest.Builder>
co.elastic.clients.elasticsearch.esql.QueryRequest.Builder
- All Implemented Interfaces:
WithJson<QueryRequest.Builder>
,ObjectBuilder<QueryRequest>
- Enclosing class:
- QueryRequest
public static class QueryRequest.Builder
extends RequestBase.AbstractBuilder<QueryRequest.Builder>
implements ObjectBuilder<QueryRequest>
Builder for
QueryRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aQueryRequest
.final QueryRequest.Builder
By default, ES|QL returns results as rows.final QueryRequest.Builder
The character to use between values within a CSV row.final QueryRequest.Builder
dropNullColumns
(Boolean value) Should columns that are entirelynull
be removed from thecolumns
andvalues
portion of the results? Defaults tofalse
.final QueryRequest.Builder
Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.final QueryRequest.Builder
Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.final QueryRequest.Builder
format
(EsqlFormat value) A short version of the Accept header, e.g.final QueryRequest.Builder
API name:locale
final QueryRequest.Builder
params
(boolean value, boolean... values) To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.Builder
params
(double value, double... values) To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.Builder
params
(long value, long... values) To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.Builder
params
(FieldValue value, FieldValue... values) To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.Builder
To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.Builder
To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.Builder
params
(List<FieldValue> list) To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters.final QueryRequest.Builder
If provided andtrue
the response will include an extraprofile
object with information on how the query was executed.final QueryRequest.Builder
Required - The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.protected QueryRequest.Builder
self()
final QueryRequest.Builder
tables
(String key, Map<String, TableValues> value) Tables to use with the LOOKUP operation.final QueryRequest.Builder
Tables to use with the LOOKUP operation.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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 entirelynull
be removed from thecolumns
andvalues
portion of the results? Defaults tofalse
. Iftrue
then the response will include an extra section under the nameall_columns
which 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
-
format
A short version of the Accept header, e.g. json, yaml.API name:
format
-
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:
params
Adds all elements of
list
toparams
. -
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:
params
Adds 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:
params
Adds all passed 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:
params
Adds all passed 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:
params
Adds all passed 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:
params
Adds all passed 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:
params
Adds a value to
params
using a builder lambda. -
profile
If provided andtrue
the response will include an extraprofile
object 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:
tables
Adds all entries of
map
totables
. -
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:
tables
Adds an entry to
tables
. -
self
- Specified by:
self
in classRequestBase.AbstractBuilder<QueryRequest.Builder>
-
build
Builds aQueryRequest
.- Specified by:
build
in interfaceObjectBuilder<QueryRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-