Class MgetRequest.Builder
- All Implemented Interfaces:
WithJson<MgetRequest.Builder>
,ObjectBuilder<MgetRequest>
- Enclosing class:
- MgetRequest
public static class MgetRequest.Builder extends RequestBase.AbstractBuilder<MgetRequest.Builder> implements ObjectBuilder<MgetRequest>
MgetRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description MgetRequest
build()
Builds aMgetRequest
.MgetRequest.Builder
docs(MultiGetOperation value, MultiGetOperation... values)
The documents you want to retrieve.MgetRequest.Builder
docs(java.util.function.Function<MultiGetOperation.Builder,ObjectBuilder<MultiGetOperation>> fn)
The documents you want to retrieve.MgetRequest.Builder
docs(java.util.List<MultiGetOperation> list)
The documents you want to retrieve.MgetRequest.Builder
ids(java.lang.String value, java.lang.String... values)
The IDs of the documents you want to retrieve.MgetRequest.Builder
ids(java.util.List<java.lang.String> list)
The IDs of the documents you want to retrieve.MgetRequest.Builder
index(java.lang.String value)
Name of the index to retrieve documents from whenids
are specified, or when a document in thedocs
array does not specify an index.MgetRequest.Builder
preference(java.lang.String value)
Specifies the node or shard the operation should be performed on.MgetRequest.Builder
realtime(java.lang.Boolean value)
Iftrue
, the request is real-time as opposed to near-real-time.MgetRequest.Builder
refresh(java.lang.Boolean value)
Iftrue
, the request refreshes relevant shards before retrieving documents.MgetRequest.Builder
routing(java.lang.String value)
Custom value used to route operations to a specific shard.protected MgetRequest.Builder
self()
MgetRequest.Builder
source(SourceConfigParam value)
True or false to return the_source
field or not, or a list of fields to return.MgetRequest.Builder
source(java.util.function.Function<SourceConfigParam.Builder,ObjectBuilder<SourceConfigParam>> fn)
True or false to return the_source
field or not, or a list of fields to return.MgetRequest.Builder
sourceExcludes(java.lang.String value, java.lang.String... values)
A comma-separated list of source fields to exclude from the response.MgetRequest.Builder
sourceExcludes(java.util.List<java.lang.String> list)
A comma-separated list of source fields to exclude from the response.MgetRequest.Builder
sourceIncludes(java.lang.String value, java.lang.String... values)
A comma-separated list of source fields to include in the response.MgetRequest.Builder
sourceIncludes(java.util.List<java.lang.String> list)
A comma-separated list of source fields to include in the response.MgetRequest.Builder
storedFields(java.lang.String value, java.lang.String... values)
Iftrue
, retrieves the document fields stored in the index rather than the document_source
.MgetRequest.Builder
storedFields(java.util.List<java.lang.String> list)
Iftrue
, retrieves the document fields stored in the index rather than the document_source
.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
source
True or false to return the_source
field or not, or a list of fields to return.API name:
_source
-
source
public final MgetRequest.Builder source(java.util.function.Function<SourceConfigParam.Builder,ObjectBuilder<SourceConfigParam>> fn)True or false to return the_source
field or not, or a list of fields to return.API name:
_source
-
sourceExcludes
A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in_source_includes
query parameter.API name:
_source_excludes
Adds all elements of
list
tosourceExcludes
. -
sourceExcludes
public final MgetRequest.Builder sourceExcludes(java.lang.String value, java.lang.String... values)A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in_source_includes
query parameter.API name:
_source_excludes
Adds one or more values to
sourceExcludes
. -
sourceIncludes
A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the_source_excludes
query parameter. If the_source
parameter isfalse
, this parameter is ignored.API name:
_source_includes
Adds all elements of
list
tosourceIncludes
. -
sourceIncludes
public final MgetRequest.Builder sourceIncludes(java.lang.String value, java.lang.String... values)A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the_source_excludes
query parameter. If the_source
parameter isfalse
, this parameter is ignored.API name:
_source_includes
Adds one or more values to
sourceIncludes
. -
docs
The documents you want to retrieve. Required if no index is specified in the request URI.API name:
docs
Adds all elements of
list
todocs
. -
docs
The documents you want to retrieve. Required if no index is specified in the request URI.API name:
docs
Adds one or more values to
docs
. -
docs
public final MgetRequest.Builder docs(java.util.function.Function<MultiGetOperation.Builder,ObjectBuilder<MultiGetOperation>> fn)The documents you want to retrieve. Required if no index is specified in the request URI.API name:
docs
Adds a value to
docs
using a builder lambda. -
ids
The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.API name:
ids
Adds all elements of
list
toids
. -
ids
The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.API name:
ids
Adds one or more values to
ids
. -
index
Name of the index to retrieve documents from whenids
are specified, or when a document in thedocs
array does not specify an index.API name:
index
-
preference
Specifies the node or shard the operation should be performed on. Random by default.API name:
preference
-
realtime
Iftrue
, the request is real-time as opposed to near-real-time.API name:
realtime
-
refresh
Iftrue
, the request refreshes relevant shards before retrieving documents.API name:
refresh
-
routing
Custom value used to route operations to a specific shard.API name:
routing
-
storedFields
Iftrue
, retrieves the document fields stored in the index rather than the document_source
.API name:
stored_fields
Adds all elements of
list
tostoredFields
. -
storedFields
Iftrue
, retrieves the document fields stored in the index rather than the document_source
.API name:
stored_fields
Adds one or more values to
storedFields
. -
self
- Specified by:
self
in classRequestBase.AbstractBuilder<MgetRequest.Builder>
-
build
Builds aMgetRequest
.- Specified by:
build
in interfaceObjectBuilder<MgetRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-