Class MgetRequest.Builder
- All Implemented Interfaces:
WithJson<MgetRequest.Builder>,ObjectBuilder<MgetRequest>
- Enclosing class:
- MgetRequest
MgetRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aMgetRequest.final MgetRequest.Builderdocs(MultiGetOperation value, MultiGetOperation... values) The documents you want to retrieve.final MgetRequest.BuilderThe documents you want to retrieve.final MgetRequest.Builderdocs(List<MultiGetOperation> list) The documents you want to retrieve.final MgetRequest.BuilderforceSyntheticSource(Boolean value) Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.final MgetRequest.BuilderThe IDs of the documents you want to retrieve.final MgetRequest.BuilderThe IDs of the documents you want to retrieve.final MgetRequest.BuilderName of the index to retrieve documents from whenidsare specified, or when a document in thedocsarray does not specify an index.final MgetRequest.Builderpreference(String value) Specifies the node or shard the operation should be performed on.final MgetRequest.BuilderIftrue, the request is real-time as opposed to near-real-time.final MgetRequest.BuilderIftrue, the request refreshes relevant shards before retrieving documents.final MgetRequest.BuilderCustom value used to route operations to a specific shard.protected MgetRequest.Builderself()final MgetRequest.Buildersource(SourceConfigParam value) True or false to return the_sourcefield or not, or a list of fields to return.final MgetRequest.BuilderTrue or false to return the_sourcefield or not, or a list of fields to return.final MgetRequest.BuildersourceExcludes(String value, String... values) A comma-separated list of source fields to exclude from the response.final MgetRequest.BuildersourceExcludes(List<String> list) A comma-separated list of source fields to exclude from the response.final MgetRequest.BuildersourceIncludes(String value, String... values) A comma-separated list of source fields to include in the response.final MgetRequest.BuildersourceIncludes(List<String> list) A comma-separated list of source fields to include in the response.final MgetRequest.BuilderstoredFields(String value, String... values) Iftrue, retrieves the document fields stored in the index rather than the document_source.final MgetRequest.BuilderstoredFields(List<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
withJsonMethods 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_sourcefield 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_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
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
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(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. -
forceSyntheticSource
Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.API name:
force_synthetic_source -
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. -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<MgetRequest.Builder>
-
build
Builds aMgetRequest.- Specified by:
buildin interfaceObjectBuilder<MgetRequest>- Throws:
NullPointerException- if some of the required fields are null.
-