Class MgetRequest.Builder
- All Implemented Interfaces:
WithJson<MgetRequest.Builder>,ObjectBuilder<MgetRequest>
- Enclosing class:
- MgetRequest
public static class MgetRequest.Builder extends WithJsonObjectBuilderBase<MgetRequest.Builder> implements ObjectBuilder<MgetRequest>
MgetRequest.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description MgetRequestbuild()Builds aMgetRequest.MgetRequest.Builderdocs(MultiGetOperation value, MultiGetOperation... values)The documents you want to retrieve.MgetRequest.Builderdocs(java.util.function.Function<MultiGetOperation.Builder,ObjectBuilder<MultiGetOperation>> fn)The documents you want to retrieve.MgetRequest.Builderdocs(java.util.List<MultiGetOperation> list)The documents you want to retrieve.MgetRequest.Builderids(java.lang.String value, java.lang.String... values)The IDs of the documents you want to retrieve.MgetRequest.Builderids(java.util.List<java.lang.String> list)The IDs of the documents you want to retrieve.MgetRequest.Builderindex(java.lang.String value)Name of the index to retrieve documents from whenidsare specified, or when a document in thedocsarray does not specify an index.MgetRequest.Builderpreference(java.lang.String value)Specifies the node or shard the operation should be performed on.MgetRequest.Builderrealtime(java.lang.Boolean value)Iftrue, the request is real-time as opposed to near-real-time.MgetRequest.Builderrefresh(java.lang.Boolean value)Iftrue, the request refreshes relevant shards before retrieving documents.MgetRequest.Builderrouting(java.lang.String value)Custom value used to route operations to a specific shard.protected MgetRequest.Builderself()MgetRequest.Buildersource(SourceConfigParam value)True or false to return the_sourcefield or not, or a list of fields to return.MgetRequest.Buildersource(java.util.function.Function<SourceConfigParam.Builder,ObjectBuilder<SourceConfigParam>> fn)True or false to return the_sourcefield or not, or a list of fields to return.MgetRequest.BuildersourceExcludes(java.lang.String value, java.lang.String... values)A comma-separated list of source fields to exclude from the response.MgetRequest.BuildersourceExcludes(java.util.List<java.lang.String> list)A comma-separated list of source fields to exclude from the response.MgetRequest.BuildersourceIncludes(java.lang.String value, java.lang.String... values)A comma-separated list of source fields to include in the response.MgetRequest.BuildersourceIncludes(java.util.List<java.lang.String> list)A comma-separated list of source fields to include in the response.MgetRequest.BuilderstoredFields(java.lang.String value, java.lang.String... values)Iftrue, retrieves the document fields stored in the index rather than the document_source.MgetRequest.BuilderstoredFields(java.util.List<java.lang.String> list)Iftrue, retrieves the document fields stored in the index rather than the document_source.MgetRequest.Buildertype(java.lang.String value)The type of the documentMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAllMethods 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_sourcefield 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_sourcefield 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_includesquery parameter.API name:
_source_excludesAdds all elements of
listtosourceExcludes. -
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_includesquery parameter.API name:
_source_excludesAdds 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_excludesquery parameter. If the_sourceparameter isfalse, this parameter is ignored.API name:
_source_includesAdds all elements of
listtosourceIncludes. -
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_excludesquery parameter. If the_sourceparameter isfalse, this parameter is ignored.API name:
_source_includesAdds 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:
docsAdds all elements of
listtodocs. -
docs
The documents you want to retrieve. Required if no index is specified in the request URI.API name:
docsAdds 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:
docsAdds a value to
docsusing 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:
idsAdds all elements of
listtoids. -
ids
The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.API name:
idsAdds one or more values to
ids. -
index
Name of the index to retrieve documents from whenidsare specified, or when a document in thedocsarray 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_fieldsAdds all elements of
listtostoredFields. -
storedFields
Iftrue, retrieves the document fields stored in the index rather than the document_source.API name:
stored_fieldsAdds one or more values to
storedFields. -
type
The type of the documentAPI name:
type -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<MgetRequest.Builder>
-
build
Builds aMgetRequest.- Specified by:
buildin interfaceObjectBuilder<MgetRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-