Class MgetRequest.Builder
- All Implemented Interfaces:
WithJson<MgetRequest.Builder>
,ObjectBuilder<MgetRequest>
- Enclosing class:
- MgetRequest
MgetRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aMgetRequest
.final MgetRequest.Builder
docs
(MultiGetOperation value, MultiGetOperation... values) The documents you want to retrieve.final MgetRequest.Builder
The documents you want to retrieve.final MgetRequest.Builder
docs
(List<MultiGetOperation> list) The documents you want to retrieve.final MgetRequest.Builder
The IDs of the documents you want to retrieve.final MgetRequest.Builder
The IDs of the documents you want to retrieve.final MgetRequest.Builder
Name of the index to retrieve documents from whenids
are specified, or when a document in thedocs
array does not specify an index.final MgetRequest.Builder
preference
(String value) Specifies the node or shard the operation should be performed on.final MgetRequest.Builder
Iftrue
, the request is real-time as opposed to near-real-time.final MgetRequest.Builder
Iftrue
, the request refreshes relevant shards before retrieving documents.final MgetRequest.Builder
Custom value used to route operations to a specific shard.protected MgetRequest.Builder
self()
final MgetRequest.Builder
source
(SourceConfigParam value) True or false to return the_source
field or not, or a list of fields to return.final MgetRequest.Builder
True or false to return the_source
field or not, or a list of fields to return.final MgetRequest.Builder
sourceExcludes
(String value, String... values) A comma-separated list of source fields to exclude from the response.final MgetRequest.Builder
sourceExcludes
(List<String> list) A comma-separated list of source fields to exclude from the response.final MgetRequest.Builder
sourceIncludes
(String value, String... values) A comma-separated list of source fields to include in the response.final MgetRequest.Builder
sourceIncludes
(List<String> list) A comma-separated list of source fields to include in the response.final MgetRequest.Builder
storedFields
(String value, String... values) Iftrue
, retrieves the document fields stored in the index rather than the document_source
.final MgetRequest.Builder
storedFields
(List<String> list) Iftrue
, retrieves the document fields stored in the index rather than the document_source
.final MgetRequest.Builder
The type of the documentMethods 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
-
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(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
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
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(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
. -
type
The type of the documentAPI name:
type
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<MgetRequest.Builder>
-
build
Builds aMgetRequest
.- Specified by:
build
in interfaceObjectBuilder<MgetRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-