Class MgetRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch._core.MgetRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<MgetRequest>
- Enclosing class:
- MgetRequest
public static class MgetRequest.Builder extends java.lang.Object implements ObjectBuilder<MgetRequest>
Builder for
MgetRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description MgetRequest.Builder
addDocs(Operation value)
Add a value todocs(List)
, creating the list if needed.MgetRequest.Builder
addDocs(java.util.function.Function<Operation.Builder,ObjectBuilder<Operation>> fn)
Add a value todocs(List)
, creating the list if needed.MgetRequest.Builder
addIds(java.lang.String value)
Add a value toids(List)
, creating the list if needed.MgetRequest.Builder
addSourceExcludes(java.lang.String value)
Add a value tosourceExcludes(List)
, creating the list if needed.MgetRequest.Builder
addSourceIncludes(java.lang.String value)
Add a value tosourceIncludes(List)
, creating the list if needed.MgetRequest.Builder
addStoredFields(java.lang.String value)
Add a value tostoredFields(List)
, creating the list if needed.MgetRequest
build()
Builds aMgetRequest
.MgetRequest.Builder
docs(Operation... value)
API name:docs
MgetRequest.Builder
docs(java.util.function.Function<Operation.Builder,ObjectBuilder<Operation>> fn)
Setdocs(List)
to a singleton list.MgetRequest.Builder
docs(java.util.List<Operation> value)
API name:docs
MgetRequest.Builder
ids(java.lang.String... value)
API name:ids
MgetRequest.Builder
ids(java.util.List<java.lang.String> value)
API name:ids
MgetRequest.Builder
index(java.lang.String value)
The name of the indexMgetRequest.Builder
preference(java.lang.String value)
Specify the node or shard the operation should be performed on (default: random)MgetRequest.Builder
realtime(java.lang.Boolean value)
Specify whether to perform the operation in realtime or search modeMgetRequest.Builder
refresh(java.lang.Boolean value)
Refresh the shard containing the document before performing the operationMgetRequest.Builder
routing(java.lang.String value)
Specific routing valueMgetRequest.Builder
source(jakarta.json.JsonValue value)
True or false to return the _source field or not, or a list of fields to returnMgetRequest.Builder
sourceExcludes(java.lang.String... value)
A list of fields to exclude from the returned _source fieldMgetRequest.Builder
sourceExcludes(java.util.List<java.lang.String> value)
A list of fields to exclude from the returned _source fieldMgetRequest.Builder
sourceIncludes(java.lang.String... value)
A list of fields to extract and return from the _source fieldMgetRequest.Builder
sourceIncludes(java.util.List<java.lang.String> value)
A list of fields to extract and return from the _source fieldMgetRequest.Builder
storedFields(java.lang.String... value)
A comma-separated list of stored fields to return in the responseMgetRequest.Builder
storedFields(java.util.List<java.lang.String> value)
A comma-separated list of stored fields to return in the responseMgetRequest.Builder
type(java.lang.String value)
The type of the documentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
index
The name of the indexAPI name:
index
-
type
The type of the documentAPI name:
type
-
preference
Specify the node or shard the operation should be performed on (default: random)API name:
preference
-
realtime
Specify whether to perform the operation in realtime or search modeAPI name:
realtime
-
refresh
Refresh the shard containing the document before performing the operationAPI name:
refresh
-
routing
Specific routing valueAPI name:
routing
-
source
True or false to return the _source field or not, or a list of fields to returnAPI name:
_source
-
sourceExcludes
A list of fields to exclude from the returned _source fieldAPI name:
_source_excludes
-
sourceExcludes
A list of fields to exclude from the returned _source fieldAPI name:
_source_excludes
-
addSourceExcludes
Add a value tosourceExcludes(List)
, creating the list if needed. -
sourceIncludes
A list of fields to extract and return from the _source fieldAPI name:
_source_includes
-
sourceIncludes
A list of fields to extract and return from the _source fieldAPI name:
_source_includes
-
addSourceIncludes
Add a value tosourceIncludes(List)
, creating the list if needed. -
storedFields
A comma-separated list of stored fields to return in the responseAPI name:
stored_fields
-
storedFields
A comma-separated list of stored fields to return in the responseAPI name:
stored_fields
-
addStoredFields
Add a value tostoredFields(List)
, creating the list if needed. -
docs
API name:docs
-
docs
API name:docs
-
addDocs
Add a value todocs(List)
, creating the list if needed. -
docs
public MgetRequest.Builder docs(java.util.function.Function<Operation.Builder,ObjectBuilder<Operation>> fn)Setdocs(List)
to a singleton list. -
addDocs
public MgetRequest.Builder addDocs(java.util.function.Function<Operation.Builder,ObjectBuilder<Operation>> fn)Add a value todocs(List)
, creating the list if needed. -
ids
API name:ids
-
ids
API name:ids
-
addIds
Add a value toids(List)
, creating the list if needed. -
build
Builds aMgetRequest
.- Specified by:
build
in interfaceObjectBuilder<MgetRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-