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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aGetRequest.final GetRequest.BuilderRequired - Unique identifier of the document.final GetRequest.BuilderRequired - Name of the index that contains the document.final GetRequest.Builderpreference(String value) Specifies the node or shard the operation should be performed on.final GetRequest.BuilderBoolean) If true, the request is real-time as opposed to near-real-time.final GetRequest.BuilderIf true, Elasticsearch refreshes the affected shards to make this operation visible to search.final GetRequest.BuilderTarget the specified primary shard.protected GetRequest.Builderself()final GetRequest.Buildersource(SourceConfigParam value) True or false to return the _source field or not, or a list of fields to return.final GetRequest.BuilderTrue or false to return the _source field or not, or a list of fields to return.final GetRequest.BuildersourceExcludes(String value, String... values) A comma-separated list of source fields to exclude in the response.final GetRequest.BuildersourceExcludes(List<String> list) A comma-separated list of source fields to exclude in the response.final GetRequest.BuildersourceIncludes(String value, String... values) A comma-separated list of source fields to include in the response.final GetRequest.BuildersourceIncludes(List<String> list) A comma-separated list of source fields to include in the response.final GetRequest.BuilderstoredFields(String value, String... values) A comma-separated list of stored fields to return in the responsefinal GetRequest.BuilderstoredFields(List<String> list) A comma-separated list of stored fields to return in the responsefinal GetRequest.BuilderThe type of the document (use_allto fetch the first document matching the ID across all types)final GetRequest.BuilderExplicit version number for concurrency control.final GetRequest.BuilderversionType(VersionType value) Specific version type: internal, external, external_gte.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 _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_excludesAdds all elements of
listtosourceExcludes. -
sourceExcludes
A comma-separated list of source fields to exclude in the response.API name:
_source_excludesAdds one or more values to
sourceExcludes. -
sourceIncludes
A comma-separated list of source fields to include in the response.API name:
_source_includesAdds all elements of
listtosourceIncludes. -
sourceIncludes
A comma-separated list of source fields to include in the response.API name:
_source_includesAdds 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_fieldsAdds all elements of
listtostoredFields. -
storedFields
A comma-separated list of stored fields to return in the responseAPI name:
stored_fieldsAdds one or more values to
storedFields. -
type
The type of the document (use_allto fetch the first document matching the ID across all types)API name:
type -
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:
selfin classRequestBase.AbstractBuilder<GetRequest.Builder>
-
build
Builds aGetRequest.- Specified by:
buildin interfaceObjectBuilder<GetRequest>- Throws:
NullPointerException- if some of the required fields are null.
-