Class GetRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<GetRequest.Builder>
co.elastic.clients.elasticsearch.core.GetRequest.Builder
- All Implemented Interfaces:
WithJson<GetRequest.Builder>
,ObjectBuilder<GetRequest>
- Enclosing class:
- GetRequest
public static class GetRequest.Builder
extends RequestBase.AbstractBuilder<GetRequest.Builder>
implements ObjectBuilder<GetRequest>
Builder for
GetRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aGetRequest
.final GetRequest.Builder
Required - Unique identifier of the document.final GetRequest.Builder
Required - Name of the index that contains the document.final GetRequest.Builder
preference
(String value) Specifies the node or shard the operation should be performed on.final GetRequest.Builder
Boolean) If true, the request is real-time as opposed to near-real-time.final GetRequest.Builder
If true, Elasticsearch refreshes the affected shards to make this operation visible to search.final GetRequest.Builder
Target the specified primary shard.protected GetRequest.Builder
self()
final GetRequest.Builder
source
(SourceConfigParam value) True or false to return the _source field or not, or a list of fields to return.final GetRequest.Builder
True or false to return the _source field or not, or a list of fields to return.final GetRequest.Builder
sourceExcludes
(String value, String... values) A comma-separated list of source fields to exclude in the response.final GetRequest.Builder
sourceExcludes
(List<String> list) A comma-separated list of source fields to exclude in the response.final GetRequest.Builder
sourceIncludes
(String value, String... values) A comma-separated list of source fields to include in the response.final GetRequest.Builder
sourceIncludes
(List<String> list) A comma-separated list of source fields to include in the response.final GetRequest.Builder
storedFields
(String value, String... values) A comma-separated list of stored fields to return in the responsefinal GetRequest.Builder
storedFields
(List<String> list) A comma-separated list of stored fields to return in the responsefinal GetRequest.Builder
Explicit version number for concurrency control.final GetRequest.Builder
versionType
(VersionType value) Specific version type: internal, external, external_gte.Methods 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 GetRequest.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 in the response.API name:
_source_excludes
Adds all elements of
list
tosourceExcludes
. -
sourceExcludes
A comma-separated list of source fields to exclude in the response.API name:
_source_excludes
Adds one or more values to
sourceExcludes
. -
sourceIncludes
A comma-separated list of source fields to include in the response.API name:
_source_includes
Adds all elements of
list
tosourceIncludes
. -
sourceIncludes
A comma-separated list of source fields to include in the response.API name:
_source_includes
Adds one or more values to
sourceIncludes
. -
id
Required - Unique identifier of the document.API name:
id
-
index
Required - Name of the index that contains the document.API name:
index
-
preference
Specifies the node or shard the operation should be performed on. Random by default.API name:
preference
-
realtime
Boolean) If true, the request is real-time as opposed to near-real-time.API name:
realtime
-
refresh
If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.API name:
refresh
-
routing
Target the specified primary shard.API name:
routing
-
storedFields
A comma-separated list of stored fields to return in the responseAPI name:
stored_fields
Adds all elements of
list
tostoredFields
. -
storedFields
A comma-separated list of stored fields to return in the responseAPI name:
stored_fields
Adds one or more values to
storedFields
. -
version
Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.API name:
version
-
versionType
Specific version type: internal, external, external_gte.API name:
version_type
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<GetRequest.Builder>
-
build
Builds aGetRequest
.- Specified by:
build
in interfaceObjectBuilder<GetRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-