Class GetRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.core.GetRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<GetRequest>
- Enclosing class:
- GetRequest
public static class GetRequest.Builder extends ObjectBuilderBase implements ObjectBuilder<GetRequest>
Builder for
GetRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description GetRequest
build()
Builds aGetRequest
.GetRequest.Builder
id(java.lang.String value)
Required - Unique identifier of the document.GetRequest.Builder
index(java.lang.String value)
Required - Name of the index that contains the document.GetRequest.Builder
preference(java.lang.String value)
Specifies the node or shard the operation should be performed on.GetRequest.Builder
realtime(java.lang.Boolean value)
Boolean) If true, the request is real-time as opposed to near-real-time.GetRequest.Builder
refresh(java.lang.Boolean value)
If true, Elasticsearch refreshes the affected shards to make this operation visible to search.GetRequest.Builder
routing(java.lang.String value)
Target the specified primary shard.GetRequest.Builder
source(SourceConfigParam value)
True or false to return the _source field or not, or a list of fields to return.GetRequest.Builder
source(java.util.function.Function<SourceConfigParam.Builder,ObjectBuilder<SourceConfigParam>> fn)
True or false to return the _source field or not, or a list of fields to return.GetRequest.Builder
sourceExcludes(java.lang.String value, java.lang.String... values)
A comma-separated list of source fields to exclude in the response.GetRequest.Builder
sourceExcludes(java.util.List<java.lang.String> list)
A comma-separated list of source fields to exclude in the response.GetRequest.Builder
sourceIncludes(java.lang.String value, java.lang.String... values)
A comma-separated list of source fields to include in the response.GetRequest.Builder
sourceIncludes(java.util.List<java.lang.String> list)
A comma-separated list of source fields to include in the response.GetRequest.Builder
storedFields(java.lang.String value, java.lang.String... values)
A comma-separated list of stored fields to return in the responseGetRequest.Builder
storedFields(java.util.List<java.lang.String> list)
A comma-separated list of stored fields to return in the responseGetRequest.Builder
version(java.lang.Long value)
Explicit version number for concurrency control.GetRequest.Builder
versionType(VersionType value)
Specific version type: internal, external, external_gte.Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods 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 _source field or not, or a list of fields to return.API name:
_source
-
source
public final GetRequest.Builder source(java.util.function.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
-
build
Builds aGetRequest
.- Specified by:
build
in interfaceObjectBuilder<GetRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-