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 GetRequestbuild()Builds aGetRequest.GetRequest.Builderid(java.lang.String value)Required - Unique identifier of the document.GetRequest.Builderindex(java.lang.String value)Required - Name of the index that contains the document.GetRequest.Builderpreference(java.lang.String value)Specifies the node or shard the operation should be performed on.GetRequest.Builderrealtime(java.lang.Boolean value)Boolean) If true, the request is real-time as opposed to near-real-time.GetRequest.Builderrefresh(java.lang.Boolean value)If true, Elasticsearch refreshes the affected shards to make this operation visible to search.GetRequest.Builderrouting(java.lang.String value)Target the specified primary shard.GetRequest.Buildersource(SourceConfigParam value)True or false to return the _source field or not, or a list of fields to return.GetRequest.Buildersource(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.BuildersourceExcludes(java.lang.String value, java.lang.String... values)A comma-separated list of source fields to exclude in the response.GetRequest.BuildersourceExcludes(java.util.List<java.lang.String> list)A comma-separated list of source fields to exclude in the response.GetRequest.BuildersourceIncludes(java.lang.String value, java.lang.String... values)A comma-separated list of source fields to include in the response.GetRequest.BuildersourceIncludes(java.util.List<java.lang.String> list)A comma-separated list of source fields to include in the response.GetRequest.BuilderstoredFields(java.lang.String value, java.lang.String... values)A comma-separated list of stored fields to return in the responseGetRequest.BuilderstoredFields(java.util.List<java.lang.String> list)A comma-separated list of stored fields to return in the responseGetRequest.Buildertype(java.lang.String value)The type of the document (use_allto fetch the first document matching the ID across all types)GetRequest.Builderversion(java.lang.Long value)Explicit version number for concurrency control.GetRequest.BuilderversionType(VersionType value)Specific version type: internal, external, external_gte.Methods 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 _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_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 -
build
Builds aGetRequest.- Specified by:
buildin interfaceObjectBuilder<GetRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-